Skip to content

Instantly share code, notes, and snippets.

@refactornator
Created February 11, 2013 02:50
Show Gist options
  • Save refactornator/4752122 to your computer and use it in GitHub Desktop.
Save refactornator/4752122 to your computer and use it in GitHub Desktop.
Craigslist Blocks Google App Engine
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
@aertoria
Copy link

what is the solution for this @wlindner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment