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

Migrate to requests.Session() #3

Merged
merged 3 commits into from
Aug 27, 2020
Merged

Migrate to requests.Session() #3

merged 3 commits into from
Aug 27, 2020

Conversation

ir0nstone
Copy link
Owner

As a fix for #2 main.py now initialises a new requests.Session() object. This object is saved as context.session and reused in the utils.grab() method.

This means:

  • any changes can be made directly to the requests.Session() object and we don't have to go through all the instances

  • all requests reuse the same connection and any cookies received

@ir0nstone ir0nstone merged commit cfcb7db into master Aug 27, 2020
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