Open lifetalk opened 4 years ago
I also get this error with the latest version:
Traceback (most recent call last):
File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 255, in solve_challenge
javascript, flags=re.S
AttributeError: 'NoneType' object has no attribute 'groups'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/evar/anaconda/lib/python3.7/site-packages/telethon/client/updates.py", line 428, in _dispatch_update
await callback(event)
File "stdplugins/torrentz.py", line 22, in _
search_results = search_torrentz_eu(input_str)
File "stdplugins/torrentz.py", line 77, in search_torrentz_eu
raw_html = scraper.get(url).content
File "/Users/evar/anaconda/lib/python3.7/site-packages/requests/sessions.py", line 546, in get
return self.request('GET', url, **kwargs)
File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 129, in request
resp = self.solve_cf_challenge(resp, **kwargs)
File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 219, in solve_cf_challenge
redirect = self.request(method, submit_url, **cloudflare_kwargs)
File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 129, in request
resp = self.solve_cf_challenge(resp, **kwargs)
File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 219, in solve_cf_challenge
redirect = self.request(method, submit_url, **cloudflare_kwargs)
File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 129, in request
resp = self.solve_cf_challenge(resp, **kwargs)
File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 219, in solve_cf_challenge
redirect = self.request(method, submit_url, **cloudflare_kwargs)
File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 129, in request
resp = self.solve_cf_challenge(resp, **kwargs)
File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 219, in solve_cf_challenge
redirect = self.request(method, submit_url, **cloudflare_kwargs)
File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 129, in request
resp = self.solve_cf_challenge(resp, **kwargs)
File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 243, in solve_cf_challenge
resp = self.request(self.org_method, submit_url, **cloudflare_kwargs)
File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 129, in request
resp = self.solve_cf_challenge(resp, **kwargs)
File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 204, in solve_cf_challenge
answer, delay = self.solve_challenge(body, domain)
File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 292, in solve_challenge
% BUG_REPORT
ValueError: Unable to identify Cloudflare IUAM Javascript on website. Cloudflare may have changed their technique, or there may be a bug in the script.
# pip show cfscrape
Name: cfscrape
Version: 2.1.1
Summary: A simple Python module to bypass Cloudflare's anti-bot page. See https://github.com/Anorov/cloudflare-scrape for more information.
Home-page: https://github.com/Anorov/cloudflare-scrape
Author: Anorov
Author-email: anorov.vorona@gmail.com
License: UNKNOWN
Location: /Users/evar/anaconda/lib/python3.7/site-packages
Requires: requests
Required-by:
# node -v
v12.7.0
Hi guys, I faced errors as well when trying to get cfscrape working. I then found the exact same codebase uploaded on PyPi, named cloudscraper. Simply 'pip install cloudscraper' and use cloudscraper instead. It basically works the same.
Hi guys, I faced errors as well when trying to get cfscrape working. I then found the exact same codebase uploaded on PyPi, named cloudscraper. Simply 'pip install cloudscraper' and use cloudscraper instead. It basically works the same.
Thanks a lot @lrhys. It's work!! Thanks for your sharing!!
Hi guys, I faced errors as well when trying to get cfscrape working. I then found the exact same codebase uploaded on PyPi, named cloudscraper. Simply 'pip install cloudscraper' and use cloudscraper instead. It basically works the same.
Thanks for your investigation. I changed to cloudscrapper and it worked. On weekend I did investigate. I think cfscrape fails because the "cf_clearance" token is empty.
@lrhys @xyliutw @wsch-wa Cloudscraper does not work anymore either...
Hi guys, I faced errors as well when trying to get cfscrape working. I then found the exact same codebase uploaded on PyPi, named cloudscraper. Simply 'pip install cloudscraper' and use cloudscraper instead. It basically works the same.
thanks man it's working great.
cfscrape is really not working anymore, plz fix
Guys,its not working can someone please fix it ?
I also get this error with the latest version:
Traceback (most recent call last): File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 255, in solve_challenge javascript, flags=re.S AttributeError: 'NoneType' object has no attribute 'groups' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/evar/anaconda/lib/python3.7/site-packages/telethon/client/updates.py", line 428, in _dispatch_update await callback(event) File "stdplugins/torrentz.py", line 22, in _ search_results = search_torrentz_eu(input_str) File "stdplugins/torrentz.py", line 77, in search_torrentz_eu raw_html = scraper.get(url).content File "/Users/evar/anaconda/lib/python3.7/site-packages/requests/sessions.py", line 546, in get return self.request('GET', url, **kwargs) File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 129, in request resp = self.solve_cf_challenge(resp, **kwargs) File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 219, in solve_cf_challenge redirect = self.request(method, submit_url, **cloudflare_kwargs) File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 129, in request resp = self.solve_cf_challenge(resp, **kwargs) File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 219, in solve_cf_challenge redirect = self.request(method, submit_url, **cloudflare_kwargs) File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 129, in request resp = self.solve_cf_challenge(resp, **kwargs) File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 219, in solve_cf_challenge redirect = self.request(method, submit_url, **cloudflare_kwargs) File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 129, in request resp = self.solve_cf_challenge(resp, **kwargs) File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 219, in solve_cf_challenge redirect = self.request(method, submit_url, **cloudflare_kwargs) File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 129, in request resp = self.solve_cf_challenge(resp, **kwargs) File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 243, in solve_cf_challenge resp = self.request(self.org_method, submit_url, **cloudflare_kwargs) File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 129, in request resp = self.solve_cf_challenge(resp, **kwargs) File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 204, in solve_cf_challenge answer, delay = self.solve_challenge(body, domain) File "/Users/evar/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py", line 292, in solve_challenge % BUG_REPORT ValueError: Unable to identify Cloudflare IUAM Javascript on website. Cloudflare may have changed their technique, or there may be a bug in the script.
# pip show cfscrape Name: cfscrape Version: 2.1.1 Summary: A simple Python module to bypass Cloudflare's anti-bot page. See https://github.com/Anorov/cloudflare-scrape for more information. Home-page: https://github.com/Anorov/cloudflare-scrape Author: Anorov Author-email: anorov.vorona@gmail.com License: UNKNOWN Location: /Users/evar/anaconda/lib/python3.7/site-packages Requires: requests Required-by:
# node -v v12.7.0
Same issue here. Looks like cloudflare has changed the script content so sfscrape cannot find correct content to continue working.
I had the same issue as above and I tried using cloudscraper and it seems to be working.
The solution is to use zenrows.com, it's a proxy that fixed all of my issues(cloudflare didn't work for me either)
@Soontosh I think we all knew that a paid solution would work...
Before creating an issue, first upgrade cfscrape with
pip install -U cfscrape
and see if you're still experiencing the problem. Please also confirm your Node version (node --version
ornodejs --version
) is version 10 or higher.Make sure the website you're having issues with is actually using anti-bot protection by Cloudflare and not a competitor like Imperva Incapsula or Sucuri. And if you're using an anonymizing proxy, a VPN, or Tor, Cloudflare often flags those IPs and may block you or present you with a captcha as a result.
Please confirm the following statements and check the boxes before creating an issue:
pip install -U cfscrape
Python version number
Run
python --version
and paste the output below:cfscrape version number
Run
pip show cfscrape
and paste the output below:Code snippet involved with the issue
Complete exception and traceback
(If the problem doesn't involve an exception being raised, leave this blank)
URL of the Cloudflare-protected page
https://ddl.to/login.html
URL of Pastebin/Gist with HTML source of protected page
https://pastebin.com/GqhurQ7H