Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3970878
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
MZMcBride
May 5 2016, 9:13 PM
2016-05-05 21:13:40 (UTC+0)
Size
694 B
Referenced Files
None
Subscribers
None
View Options
$ python --version
Python 2.7.2
>>> import json, urllib2
>>> api_url = 'http://en.wikipedia.org/w/api.php'
>>> api_params = 'action=query&list=recentchanges&rclimit=5000&rctype=edit&rcnamespace=0&rcdir=newer&format=json&rcstart=20160504022715'
>>> f = urllib2.Request(api_url, api_params)
>>> print ('requesting ' + api_url + '?' + api_params)
requesting http://en.wikipedia.org/w/api.php?action=query&list=recentchanges&rclimit=5000&rctype=edit&rcnamespace=0&rcdir=newer&format=json&rcstart=20160504022715
>>> source = urllib2.urlopen(f, None, 300).read()
>>> source = json.loads(source)
>>> type(source)
<type 'dict'>
>>> source[u'query'][u'recentchanges'][0][u'title']
u'Comedy Nights Live'
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3702077
Default Alt Text
(694 B)
Attached To
Mode
P3009 (An Untitled Masterwork)
Attached
Detach File
Event Timeline
Log In to Comment