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

Support loading browsers.json from zip archive #278

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

bsandrow
Copy link

@bsandrow bsandrow commented Aug 1, 2023

If cloudscraper is embedded in a zip (e.g. zipapp), you can't use paths to load the browsers.json file, so importing the library fails. importlib.resources allows this to work, but was added in Python 3.7. I saw that you had back to Python 3.5 in tox.ini, so I added a switch to use the old behaviour prior to 3.7.

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

Successfully merging this pull request may close these issues.

1 participant