Skip to content

Instantly share code, notes, and snippets.

@chankeypathak
Forked from scraperdragon/chrome2requests.py
Created June 29, 2017 07:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chankeypathak/c0d8028e8454ec880250c609328feded to your computer and use it in GitHub Desktop.
Save chankeypathak/c0d8028e8454ec880250c609328feded to your computer and use it in GitHub Desktop.
Convert Chrome headers to Python's Requests dictionary
dict([[h.partition(':')[0], h.partition(':')[2]] for h in rawheaders.split('\n')])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment