1 import simplejson as json
2 from urllib2 import urlopen
4 wp_call = urlopen('https://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=Main_Page&rvlimit=100&rvprop=timestamp|user&format=json')
6 response = json.loads(wp_call.read())
8 for page_id in response["query"]["pages"].keys():
9 page_title = response["query"]["pages"][page_id]["title"]
10 revisions = response["query"]["pages"][page_id]["revisions"]
13 print page_title + "\t" + rev["user"] + "\t" + rev["timestamp"]