From 05c55843be37313321ece183442ef29f021d697c Mon Sep 17 00:00:00 2001 From: Edmund Martin Date: Wed, 20 Mar 2019 16:38:11 +0000 Subject: [PATCH] Update __init__.py A hidden input form has been added to the challenge which means the library currently getting and adding this 's' value fixes the library and allows us to bypass challenge. --- cfscrape/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cfscrape/__init__.py b/cfscrape/__init__.py index 37f53df..a9dcb89 100644 --- a/cfscrape/__init__.py +++ b/cfscrape/__init__.py @@ -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[^"]+)', body).group('s_value') except Exception as e: # Something is wrong with the page. # This may indicate Cloudflare has changed their anti-bot