cloudflare-scrape: cfscrape cannot solve captchas
Hello! Is there any chance that somebody can help me?
The server is a fresh instance set up specially for the test. Ubuntu 19.04 with nodejs installed.
None of the python versions(2.7, 3.7) seems to solve the issue.
Thanks for any help!
Just in case I’ve attached the output from terminal
Version number
Run pip show cfscrape
and paste the output below:
Name: cfscrape
Version: 2.0.7
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: /usr/local/lib/python2.7/dist-packages
Requires: requests
Required-by:
Code snippet experiencing the issue
import cfscrape
scraper = cfscrape.create_scraper() print scraper.get(“https://www.enotes.com/topics/alpha/”).content
Complete exception and traceback
Traceback (most recent call last): File “test.py”, line 5, in <module> print (scraper.get(“https://www.enotes.com/topics/alpha/”).content) # => “<!DOCTYPE html><html><head>…” File “/usr/local/lib/python2.7/dist-packages/requests/sessions.py”, line 546, in get return self.request(‘GET’, url, **kwargs) File “/usr/local/lib/python2.7/dist-packages/cfscrape/init.py”, line 124, in request self.handle_captcha_challenge(resp, url) File “/usr/local/lib/python2.7/dist-packages/cfscrape/init.py”, line 147, in handle_captcha_challenge raise CloudflareCaptchaError(error, response=resp) cfscrape.CloudflareCaptchaError: Cloudflare captcha challenge presented for www.enotes.com (cfscrape cannot solve captchas)
URL of the Cloudflare-protected page
https://www.enotes.com/topics/alpha/
URL of Pastebin/Gist with HTML source of protected page
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15
@pro-src I tried my script again after upgrading my OpenSSL from ‘1.1.1.a’ to ‘1.1.1.c’, and got the same captcha result, but after putting the ‘DEFAULT_CIPHERS’ line you recommended for @bajburtskii, it fixed my captcha issue
Hey @bajburtskii,
I hate to ask the obvious here but based on the title… Do you get a CAPTCHA when visiting the URL in your web browser? cfscrape can’t solve CAPTCHA as noted in the README.
Sorry, if that seems like a dumb question but if so, we can close this issue.
The difference is in the signature algorithms extensions:
Signature algorithms as reported by ssllabs (Mine)
Signature algorithms as reported by ssllabs (Yours)
Diff:
Unfortunately, I don’t know of a way to fix this, only suggestions. I find it odd that none of the workarounds worked… I would try using a proxy to rule out an IP problem. Try upgrading openssl to v1.1.1c
Sorry @bajburtskii
I’m unable to reproduce the problem, please see https://github.com/Anorov/cloudflare-scrape/issues/264 for a possible workaround.
You might also try setting only a couple of ciphers to avoid the CAPTCHA:
Otherwise for further assistance, feel free to generate a report with this script.
This must be ran from within the cloned cloudflare-scrape repo if you haven’t pip installed cfscrape