Doesen't work, it keeps running forever.
See original GitHub issueBefore 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
or nodejs --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:
- [y ] I’ve upgraded cfscrape with
pip install -U cfscrape
- [ y] I’m using Node version 10 or higher
- [y ] The site protection I’m having issues with is from Cloudflare
- [y ] I’m not using Tor, a VPN, or an anonymizing proxy
Python version number
Run python --version
and paste the output below:
Python 3.7.5
cfscrape version number
Run pip show cfscrape
and paste the output below:
Name: cfscrape
Version: 2.0.8
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/python3.7/site-packages
Requires: requests
Required-by:
Code snippet involved with the issue
>>> import cfscrape
>>> scraper = cfscrape.create_scraper()
>>> res = scraper.get("https://altadefinizione01-nuovo.link")
**... for ever, doesen't return a result**
Complete exception and traceback
(If the problem doesn’t involve an exception being raised, leave this blank)
URL of the Cloudflare-protected page
https://altadefinizione01-nuovo.link
URL of Pastebin/Gist with HTML source of protected page
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:28 (2 by maintainers)
Top GitHub Comments
Nvm, wrong repo, thought this was cloudscape, my bad😅
BTW, that library has fixed it now, and is used similarly too this one so you should try it: https://github.com/VeNoMouS/cloudscraper
For those of you who can’t wait for a new version to get published to pypi, you can patch it yourself. There is a fix from @alzamer2 in the pull requests:
https://github.com/Anorov/cloudflare-scrape/pull/315
To find where your
cfscrape
module is stored, the easiest way is with the python interpreter from the environment you want to fix. Typepython
to open up the interpreter and you’ll be greeted with a similar prompt as the one below:Type the following two commands:
…which will give you a string path location (similar to the one below):
'/home/user/anaconda/lib/python3.7/site-packages/cfscrape/__init__.py'
Open that
__init__.py
file in an editor and replace all the contents with the raw contents from the pull request:raw text from pull request 115
Save it and your cfscrape should work again.
Once the pull request is pushed to pypi just update as normal and the contents will be replaced.