Skip to content

Conversation

@AL-Hareth
Copy link

@AL-Hareth AL-Hareth commented Sep 11, 2023

the problem previously was that you were passing session as a named variable with the wrong name like this:

s = cloudscraper.create_scraper(session=s)

but if we look at the signature of the create_scraper function we find that it looks like this

def create_scraper(
    sess: Unknown | None = None,
    **kwargs: Unknown
) -> CloudScraper

so to fix this problem we can either pass the session anonymously like what i did in the pull request or we can use the proper name of the argument

s = cloudscraper.create_scraper(s)

or

s = cloudscraper.create_scraper(sess=s)

And I renamed the variable just to keep the old variable because mutating it can be bad in some cases

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