Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with cfscrape (DEFAULT_CIPHERS ImportError: cannot import name 'DEFAULT_CIPHERS' from 'urllib3.util.ssl_') #1

Open
chriss2401 opened this issue Aug 5, 2024 · 1 comment

Comments

@chriss2401
Copy link

Hi! When trying to run spitogatosscraper.py with the suggested commands, I get the following error message:

Traceback (most recent call last): File "/mnt/c/repos/spitogatos-scrapper/spitogatosscraper.py", line 2, in <module> import cfscrape File "/home/chris2401/miniconda3/envs/spitogatos-scrapper/lib/python3.12/site-packages/cfscrape/__init__.py", line 19, in <module> from urllib3.util.ssl_ import create_urllib3_context, DEFAULT_CIPHERS ImportError: cannot import name 'DEFAULT_CIPHERS' from 'urllib3.util.ssl_' (/home/chris2401/miniconda3/envs/spitogatos-scrapper/lib/python3.12/site-packages/urllib3/util/ssl_.py)

It seems like it is an issue with the cfscrape package (Anorov/cloudflare-scrape#465), and even though a patch has been made, there is no release with it. I don't know whether an alternative could be used ?

@chriss2401
Copy link
Author

It seems that if you change the __init__.py file of cfscrape manually with the recommended solution in the link provided above everything works ok. If the maintainer there releases a new version then that should close this issue. By the way, I think you are missing cfscrape in your requirements.txt file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant