Skip to content

Instantly share code, notes, and snippets.

@scraperdragon
Created August 22, 2012 11:25
Show Gist options
  • Save scraperdragon/3424623 to your computer and use it in GitHub Desktop.
Save scraperdragon/3424623 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