Created
February 22, 2011 13:38
-
-
Save garnaat/838665 to your computer and use it in GitHub Desktop.
Example showing how to access the Internet Archive with boto
This file contains hidden or 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 boto | |
# this example assumes that you have not added the AI credentials to your boto config file | |
ia = boto.connect_ia('<ia_access_key_id>', '<ia_secret_access_key') | |
stats = ia.lookup('stats') | |
for key in stats: | |
print key.name, key.size | |
# or, if you have already added the IA credentials to your boto file you can do this | |
ia = boto.connect_ia() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment