Created
February 11, 2013 02:50
-
-
Save refactornator/4752122 to your computer and use it in GitHub Desktop.
Craigslist Blocks Google App Engine
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
import requests | |
r = requests.get('http://craigslist.com') | |
print r.status_code #200 is printed because Craigslist has no idea who you are | |
r = requests.get('http://craigslist.com', headers={'User-Agent': 'AppEngine-Google'}) | |
print r.status_code #404 is printed because Craigslist doesn't like you |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what is the solution for this @wlindner