In [5]:
import pandas as pd
from mwclient import Site

In [6]:
cmn = ['DB_link','id','wiki_link','sex','name','birth_date','death_date','proffesion','nationality','polit_party']
out = pd.read_csv("c:\\Uni\\Research lab\\Test\\output_file.csv",names=cmn)
out.head()


Out[6]:
DB_link id wiki_link sex name birth_date death_date proffesion nationality polit_party
0 http://dbpedia.org/resource/Algernon_Sidney_Ba... 57 http://en.wikipedia.org/wiki/Algernon_Sidney_B... male ['algernon sidney badger @en', 'badger algerno... ['1839-10-28'] ['1905-05-09'] ['government official @en'] ['united states', 'american'] ['republican party (united states)']
1 http://dbpedia.org/resource/Kep_Enderby 249 http://en.wikipedia.org/wiki/Kep_Enderby male ['kep enderby @en'] ['1926-06-25'] ['2015-01-08'] ['barrister'] ['australian'] ['australian labor party']
2 http://dbpedia.org/resource/Jefferson_F._Long 358 http://en.wikipedia.org/wiki/Jefferson_F._Long male ['jefferson franklin long @en'] ['1836-03-03'] ['1901-02-04'] ['politician'] ['american'] ['republican party (united states)']
3 http://dbpedia.org/resource/Charles_L._McNary 390 http://en.wikipedia.org/wiki/Charles_L._McNary male ['charles l mcnary @en'] ['1874-06-12'] ['1944-02-25'] ['politician'] ['american'] ['republican party (united states)']
4 http://dbpedia.org/resource/Pierce_Butler 685 http://en.wikipedia.org/wiki/Pierce_Butler male ['pierce butler @en'] ['1744-07-11'] ['1822-02-15'] ['politician'] ['american'] ['federalist party', 'democratic-republican pa...

In [7]:
out.wiki_link.iloc[0] # First person in the list


Out[7]:
'http://en.wikipedia.org/wiki/Algernon_Sidney_Badger'

In [8]:
ua = "Uni Koblenz-Landau student, vasilev@uni-koblenz.de" #They ask to provide a signature with contacts to identify youself
site = Site('en.wikipedia.org', clients_useragent=ua)

In [9]:
page = site.pages['Algernon_Sidney_Badger'] # Getting the page about this guy
text = page.text() # Current text of the article

In [13]:
for link in page.links(): # All the outgoing links of current revision
    print(link)
    print()


{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [{'level': 'autoconfirmed', 'expiry': 'infinity', 'type': 'edit'}, {'level': 'sysop', 'expiry': 'infinity', 'type': 'move'}], 'title': 'American Civil War', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-12-01T17:40:24Z', 'lastrevid': 752047989, 'pageid': 863, 'length': 182189, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Paramilitary', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-12-01T18:07:15Z', 'lastrevid': 752512712, 'pageid': 146730, 'length': 5639, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [{'level': 'autoconfirmed', 'expiry': 'infinity', 'type': 'edit'}, {'level': 'sysop', 'expiry': 'infinity', 'type': 'move'}], 'title': 'Mobile, Alabama', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-30T19:52:53Z', 'lastrevid': 747384926, 'pageid': 20952, 'length': 143182, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Obituary', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-28T14:24:13Z', 'lastrevid': 750989026, 'pageid': 379881, 'length': 7430, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'William McKinley', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-12-01T05:39:12Z', 'lastrevid': 752123623, 'pageid': 33521, 'length': 125092, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [{'level': 'autoconfirmed', 'expiry': 'infinity', 'type': 'edit'}, {'level': 'sysop', 'expiry': 'infinity', 'type': 'move'}], 'title': 'Ohio', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-30T20:16:10Z', 'lastrevid': 752253527, 'pageid': 22199, 'length': 103242, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'White League', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-20T09:44:13Z', 'lastrevid': 750532508, 'pageid': 608974, 'length': 11837, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Milton, Massachusetts', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-28T21:19:07Z', 'lastrevid': 746951709, 'pageid': 318619, 'length': 25643, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'United States Customs Service', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-27T23:49:35Z', 'lastrevid': 732198625, 'pageid': 636847, 'length': 10165, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'False River, Louisiana', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-30T08:58:52Z', 'lastrevid': 680378771, 'pageid': 15408855, 'length': 1348, 'pagelanguagehtmlcode': 'en'}

{'redirect': '', 'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'U.S. Census', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-28T04:25:52Z', 'lastrevid': 318040719, 'pageid': 3895433, 'length': 57, 'pagelanguagehtmlcode': 'en'}

{'redirect': '', 'pagelanguagedir': 'ltr', 'new': '', 'protection': [{'level': 'autoconfirmed', 'expiry': '2018-01-01T00:00:00Z', 'type': 'edit'}, {'level': 'sysop', 'expiry': 'infinity', 'type': 'move'}], 'title': 'New York (state)', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'restrictiontypes': ['edit', 'move'], 'ns': 0, 'touched': '2016-11-26T19:06:38Z', 'lastrevid': 728821839, 'pageid': 51021251, 'length': 38, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Lieutenant', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-13T21:40:14Z', 'lastrevid': 749345859, 'pageid': 161405, 'length': 30426, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [{'level': 'autoconfirmed', 'expiry': 'infinity', 'type': 'edit'}, {'level': 'sysop', 'expiry': 'infinity', 'type': 'move'}], 'title': 'John Adams', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-12-01T14:16:23Z', 'lastrevid': 752481275, 'pageid': 10410626, 'length': 107886, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Milton Academy', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-21T15:03:43Z', 'lastrevid': 745053071, 'pageid': 494001, 'length': 21662, 'pagelanguagehtmlcode': 'en'}

{'redirect': '', 'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Baltimore, Maryland', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-29T02:42:15Z', 'lastrevid': 728116244, 'pageid': 19944589, 'length': 23, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [{'level': 'sysop', 'expiry': 'infinity', 'type': 'move'}], 'title': 'Alabama', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-30T23:34:38Z', 'lastrevid': 752384009, 'pageid': 303, 'length': 168917, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [{'level': 'autoconfirmed', 'expiry': 'infinity', 'type': 'edit'}, {'level': 'sysop', 'expiry': 'infinity', 'type': 'move'}], 'title': 'United States', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-12-01T13:38:45Z', 'lastrevid': 752477158, 'pageid': 3434750, 'length': 359893, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'International Standard Book Number', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-12-01T14:55:50Z', 'lastrevid': 752486377, 'pageid': 14919, 'length': 46524, 'pagelanguagehtmlcode': 'en'}

{'redirect': '', 'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'New Orleans, Louisiana', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-24T01:01:39Z', 'lastrevid': 728733227, 'pageid': 19775036, 'length': 52, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Lieutenant colonel', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-28T12:57:14Z', 'lastrevid': 750179516, 'pageid': 33576304, 'length': 5405, 'pagelanguagehtmlcode': 'en'}

{'redirect': '', 'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Founding Fathers', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-28T10:05:50Z', 'lastrevid': 262408159, 'pageid': 13488365, 'length': 39, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Knights Templar', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-12-01T05:31:20Z', 'lastrevid': 752118872, 'pageid': 16869, 'length': 57479, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Postmaster', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-08T22:27:32Z', 'lastrevid': 748566629, 'pageid': 22990, 'length': 2751, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Portal:Massachusetts', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 100, 'touched': '2016-11-29T07:58:10Z', 'lastrevid': 662643180, 'pageid': 15534166, 'length': 2796, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [{'level': 'autoconfirmed', 'expiry': 'infinity', 'type': 'edit'}, {'level': 'sysop', 'expiry': 'infinity', 'type': 'move'}], 'title': 'Democratic Party (United States)', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-30T03:26:13Z', 'lastrevid': 752124751, 'pageid': 5043544, 'length': 198735, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Algernon Sidney', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-27T07:07:28Z', 'lastrevid': 736315521, 'pageid': 252942, 'length': 34650, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Portal:American Civil War', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 100, 'touched': '2016-11-20T02:53:08Z', 'lastrevid': 708319364, 'pageid': 6748620, 'length': 3611, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [{'level': 'sysop', 'expiry': 'infinity', 'type': 'move'}], 'title': 'Mardi Gras', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-30T03:27:38Z', 'lastrevid': 752132572, 'pageid': 38482, 'length': 19700, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [{'level': 'sysop', 'expiry': 'infinity', 'type': 'move'}], 'title': 'The New York Times', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-12-01T03:06:55Z', 'lastrevid': 752413022, 'pageid': 30680, 'length': 117563, 'pagelanguagehtmlcode': 'en'}

{'redirect': '', 'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Customs House', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-09T21:50:32Z', 'lastrevid': 456638382, 'pageid': 1700582, 'length': 26, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'John McEnery', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-28T04:06:16Z', 'lastrevid': 748581803, 'pageid': 5982225, 'length': 4909, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [{'level': 'sysop', 'expiry': 'infinity', 'type': 'move'}], 'title': 'Indiana', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-29T12:15:44Z', 'lastrevid': 751475335, 'pageid': 21883857, 'length': 129269, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': '1st Louisiana Regiment Cavalry (Union)', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-30T07:18:22Z', 'lastrevid': 742588784, 'pageid': 27390495, 'length': 4470, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Grand Army of the Republic', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-20T02:52:53Z', 'lastrevid': 735803024, 'pageid': 173067, 'length': 21603, 'pagelanguagehtmlcode': 'en'}

{'redirect': '', 'pagelanguagedir': 'ltr', 'new': '', 'protection': [], 'title': 'Krewe of Rex', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'restrictiontypes': ['edit', 'move'], 'ns': 0, 'touched': '2016-10-10T07:54:43Z', 'lastrevid': 16110775, 'pageid': 231838, 'length': 24, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Pointe Coupee Parish, Louisiana', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-12-01T03:58:54Z', 'lastrevid': 728136006, 'pageid': 97679, 'length': 18443, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Portal:Louisiana', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 100, 'touched': '2016-11-20T20:14:36Z', 'lastrevid': 710183797, 'pageid': 12265491, 'length': 2650, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [{'level': 'autoconfirmed', 'expiry': 'infinity', 'type': 'edit'}, {'level': 'sysop', 'expiry': 'infinity', 'type': 'move'}], 'title': 'Thomas Jefferson', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-30T22:36:45Z', 'lastrevid': 751459620, 'pageid': 29922, 'length': 176148, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Johns Hopkins University Press', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-12-01T02:28:35Z', 'lastrevid': 733751594, 'pageid': 3726095, 'length': 3786, 'pagelanguagehtmlcode': 'en'}

{'redirect': '', 'pagelanguagedir': 'ltr', 'new': '', 'protection': [{'level': 'sysop', 'expiry': 'infinity', 'type': 'edit'}, {'level': 'sysop', 'expiry': 'infinity', 'type': 'move'}], 'title': 'Boston, Massachusetts', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'restrictiontypes': ['edit', 'move'], 'ns': 0, 'touched': '2016-11-25T22:33:18Z', 'lastrevid': 346511357, 'pageid': 26349082, 'length': 20, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Union Army', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-12-01T10:06:25Z', 'lastrevid': 752001383, 'pageid': 360126, 'length': 45377, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [{'level': 'sysop', 'expiry': 'infinity', 'type': 'move'}], 'title': 'Benjamin Harrison', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-29T17:01:27Z', 'lastrevid': 752124444, 'pageid': 7766419, 'length': 85362, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Episcopal Church (United States)', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-12-01T16:16:43Z', 'lastrevid': 752496819, 'pageid': 19280748, 'length': 108131, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Dictionary of National Biography', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-18T17:04:28Z', 'lastrevid': 726630355, 'pageid': 232417, 'length': 23875, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Battle of Liberty Place', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-30T07:29:28Z', 'lastrevid': 743574748, 'pageid': 23176396, 'length': 19582, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [{'level': 'autoconfirmed', 'expiry': 'infinity', 'type': 'edit'}, {'level': 'sysop', 'expiry': 'infinity', 'type': 'move'}], 'title': 'New Orleans', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-12-01T02:45:18Z', 'lastrevid': 751847447, 'pageid': 53842, 'length': 167291, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Digital object identifier', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-30T01:55:39Z', 'lastrevid': 749454153, 'pageid': 422994, 'length': 27137, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [{'level': 'autoconfirmed', 'expiry': 'infinity', 'type': 'edit'}, {'level': 'sysop', 'expiry': 'infinity', 'type': 'move'}], 'title': 'Grover Cleveland', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-30T18:14:48Z', 'lastrevid': 752124057, 'pageid': 12495, 'length': 107559, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Colonel', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-19T08:28:12Z', 'lastrevid': 743977655, 'pageid': 199023, 'length': 24237, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Metairie Cemetery', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-27T01:52:26Z', 'lastrevid': 751340006, 'pageid': 642893, 'length': 9437, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'New Orleans Police Department', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-30T02:00:14Z', 'lastrevid': 752116979, 'pageid': 9623258, 'length': 72922, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [{'level': 'sysop', 'expiry': 'infinity', 'type': 'move'}], 'title': 'Massachusetts', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-30T20:16:49Z', 'lastrevid': 752353848, 'pageid': 1645518, 'length': 162973, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Masonic lodge', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-10-31T02:20:07Z', 'lastrevid': 740065658, 'pageid': 55873, 'length': 13528, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Rutherford B. Hayes', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-12-01T00:11:41Z', 'lastrevid': 752390592, 'pageid': 19729241, 'length': 90207, 'pagelanguagehtmlcode': 'en'}

{'redirect': '', 'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Red River campaign', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-29T05:17:55Z', 'lastrevid': 176829702, 'pageid': 14339721, 'length': 64, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [{'level': 'sysop', 'expiry': 'infinity', 'type': 'move'}], 'title': 'Louisiana', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-12-01T09:57:47Z', 'lastrevid': 752455551, 'pageid': 18130, 'length': 145775, 'pagelanguagehtmlcode': 'en'}

{'redirect': '', 'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'General', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-28T01:32:24Z', 'lastrevid': 672651784, 'pageid': 11560876, 'length': 29, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [{'level': 'autoconfirmed', 'expiry': 'infinity', 'type': 'edit'}, {'level': 'sysop', 'expiry': 'infinity', 'type': 'move'}], 'title': 'Republican Party (United States)', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-12-01T05:38:09Z', 'lastrevid': 752286047, 'pageid': 32070, 'length': 144207, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Battle of Mobile Bay', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-30T09:05:49Z', 'lastrevid': 746658488, 'pageid': 1075807, 'length': 45990, 'pagelanguagehtmlcode': 'en'}

{'redirect': '', 'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Reconstruction era in the United States', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-30T23:26:43Z', 'lastrevid': 518387744, 'pageid': 25256295, 'length': 58, 'pagelanguagehtmlcode': 'en'}

{'pagelanguagedir': 'ltr', 'restrictiontypes': ['edit', 'move'], 'protection': [], 'title': 'Louisiana Historical Association', 'contentmodel': 'wikitext', 'pagelanguage': 'en', 'ns': 0, 'touched': '2016-11-30T14:17:22Z', 'lastrevid': 740622465, 'pageid': 28110406, 'length': 8426, 'pagelanguagehtmlcode': 'en'}


In [14]:
page.revisions(prop='ids|timestamp|flags|comment|user') #List with all information about previous revisions


Out[14]:
<List object 'revisions' for <Site object 'en.wikipedia.org/w/'>>

You can manage the type of content that you want with prop parameter. More info:https://www.mediawiki.org/wiki/API:Revisions


In [16]:
for rev in page.revisions([412438228],prop='ids|timestamp|flags|comment|user|content'): # This should provide only one revison, but provides 3
    print(rev)
    print('#'*250)
    print()


{'parentid': 412438154, '*': '{{Infobox _ person\n| name=[[Algernon Sidney Badger]]\n| nationality=[[United States|American]]\n| birth_date={{Birth date |1839|10|28}}\n| death_date={{death date and age|1905|5|9|1839|10|28}}\n| birth_place=[[Boston, Massachusetts|Boston]], [[Massachusetts]]\n| death_place=[[New Orleans, Louisiana|New Orleans]], [[Louisiana]], [[United States|USA]]\n| residence=New Orleans, Louisiana\n| occupation=Government official\n| alma_mater=[[Milton Academy]]\n| spouse= (1) Elizabeth Florence Parmele Badger (married 1872-1880, her death)<br>\n(2) Amelia Dechamps (married 1882)\n| children=From first marriage:<br>\nSidney Badger<br>\nFrederick Parmele Badger<br>\nJohn Algernon Badger<br>\nHarry Badger<br>\nFrom second marriage:<br>\nGeorge Chester Badger<br>\nMarion Badger Wells\n| religion=[[Episcopal]]ian\n| party=[[Republican Party (United States)|Republican]] \n| footnotes= \n}}\n\n\'\'\'Algernon Sidney Badger\'\'\' (October 28, 1839&ndash;May 9, 1905) was a [[colonel]] in the [[Union Army]] who became an important [[Republican Party (United States)|Republican]] [[carpetbagger]] government official in [[New Orleans, Louisiana|New Orleans]], [[Louisiana]], during and after [[Reconstruction era in the United States|Reconstruction]].\n\nNamed for the [[England|English]] [[politician]], [[Algernon Sidney]], who was executed for [[treason]] against [[Charles II (England)|Charles II]], Badger was born in [[Boston, Massachusetts|Boston]], [[Massachusetts]], to John Baton Badger and the former Sarah Payne Sprague. He was educated at [[Milton Academy]] in [[Milton, Massachusetts|Milton]], [[Massachusetts]], also the birthplace of [[U.S. President]] [[George Herbert Walker Bush]].\n\nBadger volunteered for service in the [[American Civil War]] with the Sixth Massachusetts Infantry, later the 26th Infantry. He was sent to New Orleans as an infantry [[lieutenant]]. In 1863, he enlisted in the First Louisiana Union Cavalry in command of Company D. He rose to [[lieutenant colonel]] and then colonel for "faithful and meritorious service" in the 1864 [[battle of Mobile]] in [[Mobile, Alabama|Mobile]], [[Alabama]]. That same year, he was wounded in battle at [[False River, Louisiana|False River]], Louisiana.<ref name=lahist>{{cite web|url=http://www.lahistory.org/site19.php\n|title=Badger, Algernon Sidney|publisher=[[Louisiana Historical Association]], \'\'A Dictionary of Louisiana Biography\'\'|accessdate=February 6, 2011}}</ref>\n\nAfter the war, Badger became a clerk in Fourth District Recorders Court in New Orleans. About 1868, he joined the New Orleans Metropolitan Police and was elevated to the superintendency in 1870. On September 14, 1874, Badger was seriously wounded at the [[Battle of Liberty Place]], an insurrection by the [[Crescent City]] [[White League]]. Badger left the police force in 1875 to serve as state tax collector in New Orleans. In 1878, during the administration of Republican President [[Rutherford B. Hayes]] of [[Ohio]], Badger was named [[postmaster]] at New Orleans. After a year, he took another patronage position, special deputy in the [[customshouse]] at New Orleans, a position that he filled until 1885, when the [[Democratic Party (United States|Democratic]] administration of [[Grover Cleveland]] of [[New York (state)|New York]] replaced him. In 1889, with the return of a Republican administration under [[Benjamin Harrison]] of [[Indiana]], Badger was named special deputy of the customs service, and then in 1890 the appraiser of merchandise at New Orleans, a post which again ended with the return of Cleveland to the presidency. Badger returned to the appraiser position about 1900, with the Republican [[William McKinley]] administration, and held that final position until his death in 1905 at the age of sixty-five.<ref name=lahist/> \n\nBadger was twice married. On April 30, 1872, he wed the former Elizabeth Florence Parmele, daughter of Frederick F. and Jane Parmele. The couple had four children, Sidney (born ca. 1873), Frederick Parmele (born ca. 1874), John Algernon (born 1876), and Harry (born 1877). Elizabeth died in 1880, and on September 9, 1882, Badger married the former Blanche B. Bilineau, the daughter of  John Blineau and the former Amelia Dechamps. From the second marriage, he had two other children, George Chester Badger (born 1883) and Marion (born 1885; later Mrs. C. E. Benton Wells).<ref name=lahist/>\n\nBadger was a member of the [[National Encampment]] and the [[Grand Army of the Republic]] veterans organizations. He was a grand commander of [[Knights Templar]] and a member of the [[Masonic lodge]]. He was [[Episcopal]]ian. He died in New Orleans and is interred there at [[Metairie Cemetery]].<ref name=lahist/><ref>\'\'A Dictionary of Louisiana Biography\'\' uses these sources in its sketch of A.S. Badger: \'\'National Cyclopedia of American Biography\'\' (1900); \'\'Biographical and Historical Memoirs of Louisiana\'\' (1892); Records of volunteer Union soldiers in Louisiana; New Orleans city directories, 1867-1905; [[U. S. Census]] for Louisiana, 1880, 1900; \'\'New Orleans Times-Democrat\'\', May 17, 1890, obituary, May 9, 1905, May 10, 1905; \'\'New Orleans Daily Picayune\'\', obituary, May 10, 1905; \'\'New Orleans Item\'\', May 9, 1905.</ref>\n\n{{Portal|American Civil War|Massachusetts|Louisiana}}\n\n==References==\n\n{{reflist}}\n\n{{Persondata <!-- Metadata: see [[Wikipedia:Persondata]]. -->\n| NAME              = Badger, Algernon Sidney\n| ALTERNATIVE NAMES = \n| SHORT DESCRIPTION =\n| DATE OF BIRTH     = October 28, 1839\n| PLACE OF BIRTH    = [[Boston, Massachusetts|Boston]], [[Massachusetts]], [[United States|USA]]\n| DATE OF DEATH     =May 9, 1905\n| PLACE OF DEATH    =[[New Orleans, Louisiana]]\n}}\n\n{{DEFAULTSORT:Badger, Algernon Sidney}}\n[[Category:1839 births]]\n[[Category:1905 deaths]]\n[[Category:People from Boston, Massachusetts]]\n[[Category:People from New Orleans, Louisiana]]\n[[Category:Milton Academy alumni]]\n[[Category:People of Massachusetts in the American Civil War]]\n[[Category:Union Army officers]]\n[[Category:American Episcopalians]]\n[[Category:Louisiana Republicans]]\n[[Category:Metairie Cemetery interments]]\n[[Category:Carpetbaggers]]', 'user': 'Billy Hathorn', 'contentmodel': 'wikitext', 'revid': 412438228, 'comment': '/* References */', 'timestamp': time.struct_time(tm_year=2011, tm_mon=2, tm_mday=6, tm_hour=23, tm_min=29, tm_sec=8, tm_wday=6, tm_yday=37, tm_isdst=-1), 'contentformat': 'text/x-wiki'}
##########################################################################################################################################################################################################################################################

{'parentid': 412437887, '*': '{{Infobox _ person\n| name=[[Algernon Sidney Badger]]\n| nationality=[[United States|American]]\n| birth_date={{Birth date |1839|10|28}}\n| death_date={{death date and age|1905|5|9|1839|10|28}}\n| birth_place=[[Boston, Massachusetts|Boston]], [[Massachusetts]]\n| death_place=[[New Orleans, Louisiana|New Orleans]], [[Louisiana]], [[United States|USA]]\n| residence=New Orleans, Louisiana\n| occupation=Government official\n| alma_mater=[[Milton Academy]]\n| spouse= (1) Elizabeth Florence Parmele Badger (married 1872-1880, her death)<br>\n(2) Amelia Dechamps (married 1882)\n| children=From first marriage:<br>\nSidney Badger<br>\nFrederick Parmele Badger<br>\nJohn Algernon Badger<br>\nHarry Badger<br>\nFrom second marriage:<br>\nGeorge Chester Badger<br>\nMarion Badger Wells\n| religion=[[Episcopal]]ian\n| party=[[Republican Party (United States)|Republican]] \n| footnotes= \n}}\n\n\'\'\'Algernon Sidney Badger\'\'\' (October 28, 1839&ndash;May 9, 1905) was a [[colonel]] in the [[Union Army]] who became an important [[Republican Party (United States)|Republican]] [[carpetbagger]] government official in [[New Orleans, Louisiana|New Orleans]], [[Louisiana]], during and after [[Reconstruction era in the United States|Reconstruction]].\n\nNamed for the [[England|English]] [[politician]], [[Algernon Sidney]], who was executed for [[treason]] against [[Charles II (England)|Charles II]], Badger was born in [[Boston, Massachusetts|Boston]], [[Massachusetts]], to John Baton Badger and the former Sarah Payne Sprague. He was educated at [[Milton Academy]] in [[Milton, Massachusetts|Milton]], [[Massachusetts]], also the birthplace of [[U.S. President]] [[George Herbert Walker Bush]].\n\nBadger volunteered for service in the [[American Civil War]] with the Sixth Massachusetts Infantry, later the 26th Infantry. He was sent to New Orleans as an infantry [[lieutenant]]. In 1863, he enlisted in the First Louisiana Union Cavalry in command of Company D. He rose to [[lieutenant colonel]] and then colonel for "faithful and meritorious service" in the 1864 [[battle of Mobile]] in [[Mobile, Alabama|Mobile]], [[Alabama]]. That same year, he was wounded in battle at [[False River, Louisiana|False River]], Louisiana.<ref name=lahist>{{cite web|url=http://www.lahistory.org/site19.php\n|title=Badger, Algernon Sidney|publisher=[[Louisiana Historical Association]], \'\'A Dictionary of Louisiana Biography\'\'|accessdate=February 6, 2011}}</ref>\n\nAfter the war, Badger became a clerk in Fourth District Recorders Court in New Orleans. About 1868, he joined the New Orleans Metropolitan Police and was elevated to the superintendency in 1870. On September 14, 1874, Badger was seriously wounded at the [[Battle of Liberty Place]], an insurrection by the [[Crescent City]] [[White League]]. Badger left the police force in 1875 to serve as state tax collector in New Orleans. In 1878, during the administration of Republican President [[Rutherford B. Hayes]] of [[Ohio]], Badger was named [[postmaster]] at New Orleans. After a year, he took another patronage position, special deputy in the [[customshouse]] at New Orleans, a position that he filled until 1885, when the [[Democratic Party (United States|Democratic]] administration of [[Grover Cleveland]] of [[New York (state)|New York]] replaced him. In 1889, with the return of a Republican administration under [[Benjamin Harrison]] of [[Indiana]], Badger was named special deputy of the customs service, and then in 1890 the appraiser of merchandise at New Orleans, a post which again ended with the return of Cleveland to the presidency. Badger returned to the appraiser position about 1900, with the Republican [[William McKinley]] administration, and held that final position until his death in 1905 at the age of sixty-five.<ref name=lahist/> \n\nBadger was twice married. On April 30, 1872, he wed the former Elizabeth Florence Parmele, daughter of Frederick F. and Jane Parmele. The couple had four children, Sidney (born ca. 1873), Frederick Parmele (born ca. 1874), John Algernon (born 1876), and Harry (born 1877). Elizabeth died in 1880, and on September 9, 1882, Badger married the former Blanche B. Bilineau, the daughter of  John Blineau and the former Amelia Dechamps. From the second marriage, he had two other children, George Chester Badger (born 1883) and Marion (born 1885; later Mrs. C. E. Benton Wells).<ref name=lahist/>\n\nBadger was a member of the [[National Encampment]] and the [[Grand Army of the Republic]] veterans organizations. He was a grand commander of [[Knights Templar]] and a member of the [[Masonic lodge]]. He was [[Episcopal]]ian. He died in New Orleans and is interred there at [[Metairie Cemetery]].<ref name=lahist/><ref>\'\'A Dictionary of Louisiana Biography\'\' uses these sources in its sketch of A.S. Badger: \'\'National Cyclopedia of American Biography\'\' (1900); \'\'Biographical and Historical Memoirs of Louisiana\'\' (1892); Records of volunteer Union soldiers in Louisiana; New Orleans city directories, 1867-1905; [[U. S. Census]] for Louisiana, 1880, 1900; \'\'New Orleans Times-Democrat\'\', May 17, 1890, obituary, May 9, 1905, May 10, 1905; \'\'New Orleans Daily Picayune\'\', obituary, May 10, 1905; \'\'New Orleans Item\'\', May 9, 1905.</ref>\n\n{{Portal|American Civil War|Massachusetts|Louisiana}}\n\n==References==\n\n{{reflist}}\n\n{{Persondata <!-- Metadata: see [[Wikipedia:Persondata]]. -->\n| NAME              = Badger, Algernon Sidney\n| ALTERNATIVE NAMES = \n| SHORT DESCRIPTION =\n| DATE OF BIRTH     = October 28, 1839\n| PLACE OF BIRTH    = [[Boston, Massachusetts|Boston]], [[Massachusetts]], [[United States|USA]]\n| DATE OF DEATH     =May 9, 1905\n| PLACE OF DEATH    =[[New Orleans, Louisiana]]\n}}\n\n{{DEFAULTSORT:Badger, Algernon Sidney}}\n[[Category:1839 births]]\n[[Category:1905 deaths]]\n[[Category:People from Boston, Massachusetts]]\n[[Category:People from New Orleans, Louisiana]]\n[[Category:Milton Academy alumni]]\n[[Category:People of Massachusetts in the American Civil War]]\n[[Category:Union Army officers]]\n[[Category:American Episcopalians]]\n[[Category:Louisiana Republicans]]\n[[Category:Metairie Cemetery interments]]\n[[Category:Southern carpetbaggers]]', 'user': 'Billy Hathorn', 'contentmodel': 'wikitext', 'revid': 412438154, 'comment': '', 'timestamp': time.struct_time(tm_year=2011, tm_mon=2, tm_mday=6, tm_hour=23, tm_min=28, tm_sec=37, tm_wday=6, tm_yday=37, tm_isdst=-1), 'contentformat': 'text/x-wiki'}
##########################################################################################################################################################################################################################################################

{'parentid': 0, '*': '{{Infobox _ person\n| name=[[Algernon Sidney Badger]]\n| nationality=[[United States|American]]\n| birth_date={{Birth date |1839|10|28}}\n| death_date={{death date and age|1905|5|9|1839|10|28}}\n| birth_place=[[Boston, Massachusetts|Boston]], [[Massachusetts]]\n| death_place=[[New Orleans, Louisiana|New Orleans]], [[Louisiana]], [[United States|USA]]\n| residence=New Orleans, Louisiana\n| occupation=Government official\n| alma_mater=[[Milton Academy]]\n| spouse= (1) Elizabeth Florence Parmele Badger (married 1872-1880, her death)<br>\n(2) Amelia Dechamps (married 1882)\n| children=From first marriage:<br>\nSidney Badger<br>\nFrederick Parmele Badger<br>\nJohn Algernon Badger<br>\nHarry Badger<br>\nFrom second marriage:<br>\nGeorge Chester Badger<br>\nMarion Badger Wells\n| religion=[[Episcopal]]ian\n| party=[[Republican Party (United States)|Republican]] \n| footnotes= \n}}\n\n\'\'\'Algernon Sidney Badger\'\'\' (October 28, 1839&ndash;May 9, 1905) was a [[colonel (rank)|colonel]] in the [[Union Army]] who became an important [[Republican Party (United States)|Republican]] [[carpetbagger]] government official in [[New Orleans, Louisiana|New Orleans]], [[Louisiana]], during and after [[Reconstruction era in the United States|Reconstruction]].\n\nNamed for the [[England|English]] [[politician]], [[Algernon Sidney]], who was executed for [[treason]] against [[Charles II (England)|Charles II]], Badger was born in [[Boston, Massachusetts|Boston]], [[Massachusetts]], to John Baton Badger and the former Sarah Payne Sprague. He was educated at [[Milton Academy]] in [[Milton, Massachusetts|Milton]], [[Massachusetts]], also the birthplace of [[U.S. President]] [[George Herbert Walker Bush]].\n\nBadger volunteered for service in the [[American Civil War]] with the Sixth Massachusetts Infantry, later the 26th Infantry. He was sent to New Orleans as an infantry [[lieutenant (rank)|lieutenant]]. In 1863, he enlisted in the First Louisiana Union Cavalry in command of Company D. He rose to [[lieutenant colonel]] and then colonel for "faithful and meritorious service" in the 1864 [[battle of Mobile]] in [[Mobile, Alabama|Mobile]], [[Alabama]]. That same year, he was wounded in battle at [[False River, Louisiana|False River]], Louisiana.<ref name=lahist>{{cite web|url=http://www.lahistory.org/site19.php\n|title=Badger, Algernon Sidney|publisher=[[Louisiana Historical Association]], \'\'A Dictionary of Louisiana Biography\'\'|accessdate=February 6, 2011}}</ref>\n\nAfter the war, Badger became a clerk in Fourth District Recorders Court in New Orleans. About 1868, he joined the New Orleans Metropolitan Police and was elevated to the superintendency in 1870. On September 14, 1874, Badger was seriously wounded at the [[Battle of Liberty Place[[, an insurrection by the [[Crescent City]] [[White League]]. Badger left the police force in 1875 to serve as state tax collector in New Orleans. In 1878, during the administration of Republican President [[Rutherford B. Hayes]] of [[Ohio]], Badger was named [[postmaster]] at New Orleans. After a year, he took another patronage position, special deputy in the [[customshouse]] at New Orleans, a position that he filled until 1885, when the [[Democratic Party (United States|Democratic]] administration of [[Grover Cleveland]] of [[New York (state)|New York]] replaced him. In 1889, with the return of a Republican administration under [[Benjamin Harrison]] of [[Indiana]], Badger was named special deputy of the customs service, and then in 1890 the appraiser of merchandise at New Orleans, a post which again ended with the return of Cleveland to the presidency. Badger returned to the appraiser position about 1900, with the Republican [[William McKinley]] administration, and held that final position until his death in 1905.<ref name=lahist/> \n\nBadger was twice married. On April 30, 1872, he wed the former Elizabeth Florence Parmele, daughter of Frederick F. and Jane Parmele. The couple had four children, Sidney (born ca. 1873), Frederick Parmele (born ca. 1874), John Algernon (born 1876), and Harry (born 1877). Elizabeth died in 1880, and on September 9, 1882, Badger married the former Blanche B. Bilineau, the daughter of  John Blineau and the former Amelia Dechamps. From the second marriage, he had two other children, George Chester Badger (born 1883) and Marion (born 1885; later Mrs. C. E. Benton Wells).<ref name=lahist/>\n\nBadger was a member of the [[National Encampment]] and the [[Grand Army of the Republic]] veterans organizations. He was a grand commander of [[Knights Templar]] and a member of the [[Masonic lodge]]. He was [[Episcopal]]ian. He died in New Orleans and is interred there at [[Metairie Cemetery]].<ref name=lahist/><ref>\'\'A Dictionary of Louisiana Biography\'\' uses these sources in its sketch of A.S. Badger: \'\'National Cyclopedia of American Biography\'\' (1900); \'\'Biographical and Historical Memoirs of Louisiana\'\' (1892); Records of volunteer Union soldiers in Louisiana; New Orleans city directories, 1867-1905; [[U. S. Census]] for Louisiana, 1880, 1900; \'\'New Orleans Times-Democrat\'\', May 17, 1890, obituary, May 9, 1905, May 10, 1905; \'\'New Orleans Daily Picayune\'\', obituary, May 10, 1905; \'\'New Orleans Item\'\', May 9, 1905.<ref/>\n\n{{Portal|American Civil War|Massachusetts|Louisiana}}\n\n==References==\n\n{{reflist}}\n\n{{Persondata <!-- Metadata: see [[Wikipedia:Persondata]]. -->\n| NAME              = Badger, Algernon Sidney\n| ALTERNATIVE NAMES = \n| SHORT DESCRIPTION =\n| DATE OF BIRTH     = October 28, 1839\n| PLACE OF BIRTH    = [[Boston, Massachusetts|Boston]], [[Massachusetts]], [[United States|USA]]\n| DATE OF DEATH     =May 9, 1905\n| PLACE OF DEATH    =[[New Orleans, Louisiana]]\n}}\n\n{{DEFAULTSORT:Badger, Algernon Sidney}}\n[[Category:1839 births]]\n[[Category:1905 deaths]]\n[[Category:People from Boston, Massachusetts]]\n[[Category:People from New Orleans, Louisiana]]\n[[Category:Milton Academy alumni]]\n[[Category:People of Massachusetts in the American Civil War]]\n[[Category:Union Army officers]]\n[[Category:American Episcopalians]]\n[[Category:Louisiana Republicans]]\n[[Category:Metairie Cemetery interments]]\n[[Category:Southern carpetbaggers]]', 'user': 'Billy Hathorn', 'contentmodel': 'wikitext', 'revid': 412437887, 'comment': "[[WP:AES|←]]Created page with '{{Infobox _ person | name=[[Algernon Sidney Badger]] | nationality=[[United States|American]] | birth_date={{Birth date |1839|10|28}} | death_date={{death date and ...'", 'timestamp': time.struct_time(tm_year=2011, tm_mon=2, tm_mday=6, tm_hour=23, tm_min=26, tm_sec=17, tm_wday=6, tm_yday=37, tm_isdst=-1), 'contentformat': 'text/x-wiki'}
##########################################################################################################################################################################################################################################################


In [17]:
revis = [] # This code iterates over all revisions of the given article and stores them to the list
for rev in page.revisions(prop='ids|timestamp|content',limit='max'):
    revis.append(rev)

In [20]:
prsd = site.parse(revis[-1]["*"]) # This code parses the revision from the list and stores it to the variable

In [21]:
prsd['links'] # We can access the outgoing links of a revision of given article


Out[21]:
[{'*': 'Alabama', 'exists': '', 'ns': 0},
 {'*': 'Algernon Sidney', 'exists': '', 'ns': 0},
 {'*': 'Algernon Sidney Badger', 'exists': '', 'ns': 0},
 {'*': 'American Civil War', 'exists': '', 'ns': 0},
 {'*': 'Battle of Mobile', 'exists': '', 'ns': 0},
 {'*': 'Benjamin Harrison', 'exists': '', 'ns': 0},
 {'*': 'Boston, Massachusetts', 'exists': '', 'ns': 0},
 {'*': 'Carpetbagger', 'exists': '', 'ns': 0},
 {'*': 'Charles II (England)', 'exists': '', 'ns': 0},
 {'*': 'Crescent City', 'exists': '', 'ns': 0},
 {'*': 'Customshouse', 'exists': '', 'ns': 0},
 {'*': 'Democratic Party (United States', 'exists': '', 'ns': 0},
 {'*': 'England', 'exists': '', 'ns': 0},
 {'*': 'Episcopal', 'exists': '', 'ns': 0},
 {'*': 'False River, Louisiana', 'exists': '', 'ns': 0},
 {'*': 'George Herbert Walker Bush', 'exists': '', 'ns': 0},
 {'*': 'Grand Army of the Republic', 'exists': '', 'ns': 0},
 {'*': 'Grover Cleveland', 'exists': '', 'ns': 0},
 {'*': 'Indiana', 'exists': '', 'ns': 0},
 {'*': 'Knights Templar', 'exists': '', 'ns': 0},
 {'*': 'Lieutenant colonel', 'exists': '', 'ns': 0},
 {'*': 'Louisiana', 'exists': '', 'ns': 0},
 {'*': 'Louisiana Historical Association', 'exists': '', 'ns': 0},
 {'*': 'Masonic lodge', 'exists': '', 'ns': 0},
 {'*': 'Massachusetts', 'exists': '', 'ns': 0},
 {'*': 'Metairie Cemetery', 'exists': '', 'ns': 0},
 {'*': 'Milton, Massachusetts', 'exists': '', 'ns': 0},
 {'*': 'Milton Academy', 'exists': '', 'ns': 0},
 {'*': 'Mobile, Alabama', 'exists': '', 'ns': 0},
 {'*': 'New Orleans, Louisiana', 'exists': '', 'ns': 0},
 {'*': 'New York (state)', 'exists': '', 'ns': 0},
 {'*': 'Ohio', 'exists': '', 'ns': 0},
 {'*': 'Politician', 'exists': '', 'ns': 0},
 {'*': 'Postmaster', 'exists': '', 'ns': 0},
 {'*': 'Reconstruction era in the United States', 'exists': '', 'ns': 0},
 {'*': 'Republican Party (United States)', 'exists': '', 'ns': 0},
 {'*': 'Rutherford B. Hayes', 'exists': '', 'ns': 0},
 {'*': 'Treason', 'exists': '', 'ns': 0},
 {'*': 'U.S. President', 'exists': '', 'ns': 0},
 {'*': 'Union Army', 'exists': '', 'ns': 0},
 {'*': 'United States', 'exists': '', 'ns': 0},
 {'*': 'White League', 'exists': '', 'ns': 0},
 {'*': 'William McKinley', 'exists': '', 'ns': 0},
 {'*': 'Colonel (rank)', 'ns': 0},
 {'*': 'Lieutenant (rank)', 'ns': 0},
 {'*': 'National Encampment', 'ns': 0},
 {'*': 'U. S. Census', 'ns': 0},
 {'*': 'Help:Cite errors/Cite error ref no key', 'exists': '', 'ns': 12},
 {'*': 'Portal:American Civil War', 'exists': '', 'ns': 100},
 {'*': 'Portal:Louisiana', 'exists': '', 'ns': 100},
 {'*': 'Portal:Massachusetts', 'exists': '', 'ns': 100},
 {'*': 'Template:Persondata', 'ns': 10}]