Skip to content

Instantly share code, notes, and snippets.

@ddahan
Created January 4, 2017 15:55
Show Gist options
  • Save ddahan/30efe60c564ac05a0f2cac06679a4097 to your computer and use it in GitHub Desktop.
Save ddahan/30efe60c564ac05a0f2cac06679a4097 to your computer and use it in GitHub Desktop.
fake_headers = {
# Headers taken from Chrome spy mode
'Connection': 'keep-alive',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36',
'Accept-Encoding': 'gzip, deflate, sdch',
'Accept-Language': 'fr,en-US;q=0.8,en;q=0.6'}
r = requests.get(cur_url, headers=fake_headers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment