Created
September 26, 2011 19:17
-
-
Save edsu/1243098 to your computer and use it in GitHub Desktop.
microdata experiment
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 microdata | |
| >>> import urllib | |
| >>> html = urllib.urlopen('http://lx6.loc.gov').read() | |
| >>> items = microdata.get_items(html) | |
| >>> print len(items) | |
| 30 | |
| >>> print items[0].tweet_time | |
| 2011-02-15 06:00 | |
| >>> print items[0].json() | |
| { | |
| "status": [ | |
| "fetching" | |
| ], | |
| "updated": [ | |
| "2011-09-26 15:15:34" | |
| ], | |
| "unpack_time": [ | |
| "" | |
| ], | |
| "fetch_time": [ | |
| "" | |
| ], | |
| "num_deletes": [ | |
| "" | |
| ], | |
| "$itemid": "/api/v1/bag/1572", | |
| "tweet_time": [ | |
| "2011-02-15 06:00" | |
| ], | |
| "$itemtype": "http://twitter.loc.gov/#bag", | |
| "num_tweets": [ | |
| "" | |
| ], | |
| "analysis_time": [ | |
| "" | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment