cfscrape cannot solve captchas
See original GitHub issueHello! 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
Issue Analytics
- State:
- Created 4 years ago
- Comments:15
Top GitHub Comments
@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
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