Skip to content

Instantly share code, notes, and snippets.

@edsu
Last active August 29, 2015 14:02
Show Gist options
  • Save edsu/b9f4c19f7962ff6a4d19 to your computer and use it in GitHub Desktop.
Save edsu/b9f4c19f7962ff6a4d19 to your computer and use it in GitHub Desktop.
A demonstration of how Google (and other indexing robots) are unable to crawl The American Archivist. The American Archivist is the journal of the Society of American Archivists, and is "freely available to the public, with the exception of full-text articles from the three most recent volumes".
>>> import robotparser
>>> rp = robotparser.RobotFileParser('http://archivists.metapress.com/robots.txt')
>>> rp.read()
>>> rp.can_fetch('Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)', '/content/953m4u0116t20624/?p=bf20338aa6ef4bc0a60dac3f2c38a6bd&pi=2')
False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment