Skip to content

Instantly share code, notes, and snippets.

@jazzdev
Created October 1, 2024 20:31
Show Gist options
  • Select an option

  • Save jazzdev/e96387272588992e03adc02475d9fb7e to your computer and use it in GitHub Desktop.

Select an option

Save jazzdev/e96387272588992e03adc02475d9fb7e to your computer and use it in GitHub Desktop.
Fix requests to package to parse cookies correctly
@jazzdev
Copy link
Author

jazzdev commented Oct 1, 2024

If requests isn't setting the cookies correctly, this might help. Just import after importing requests

import requests
import requests_cookie_fix

If you are using requests to automate a Django app, you might run into this, as Django does put multiple cookies in a single Set-Cookie header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment