Skip to content

Commit

Permalink
Merge pull request #194 from washedev/patch-1
Browse files Browse the repository at this point in the history
Update __init__.py
  • Loading branch information
Anorov authored Mar 14, 2019
2 parents 25e8755 + a34d466 commit 863b7ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cfscrape/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def solve_challenge(self, body, domain):
except Exception:
raise ValueError("Unable to identify Cloudflare IUAM Javascript on website. %s" % BUG_REPORT)

js = re.sub(r"a\.value = (.+ \+ t\.length).+", r"\1", js)
js = re.sub(r"a\.value = (.+ \+ t\.length(\).toFixed\(10\))?).+", r"\1", js)
js = re.sub(r"\s{3,}[a-z](?: = |\.).+", "", js).replace("t.length", str(len(domain)))

# Strip characters that could be used to exit the string context
Expand Down

0 comments on commit 863b7ad

Please sign in to comment.