Created
January 4, 2017 15:55
-
-
Save ddahan/30efe60c564ac05a0f2cac06679a4097 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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