Skip to content

Commit

Permalink
Upgrade cfscrape to version 1.9.7 (#5405)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyWoolaver authored and miigotu committed Apr 7, 2019
1 parent 643ff77 commit b3da866
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/cfscrape/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
except ImportError:
from urllib.parse import urlparse

__version__ = "1.9.6"
__version__ = "1.9.7"

DEFAULT_USER_AGENTS = [
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36",
Expand Down Expand Up @@ -85,6 +85,7 @@ def solve_cf_challenge(self, resp, **original_kwargs):
try:
params["jschl_vc"] = re.search(r'name="jschl_vc" value="(\w+)"', body).group(1)
params["pass"] = re.search(r'name="pass" value="(.+?)"', body).group(1)
params["s"] = re.search(r'name="s"\svalue="(?P<s_value>[^"]+)', body).group('s_value')
except Exception as e:
# Something is wrong with the page.
# This may indicate Cloudflare has changed their anti-bot
Expand Down

0 comments on commit b3da866

Please sign in to comment.