Revision: 8144 Author: shizhao Date: 2010-05-04 15:04:43 +0000 (Tue, 04 May 2010)
Log Message: ----------- categories() old and via API is same list
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2010-05-04 14:43:03 UTC (rev 8143) +++ trunk/pywikipedia/wikipedia.py 2010-05-04 15:04:43 UTC (rev 8144) @@ -2206,7 +2206,8 @@ data=datas['query']['pages'].values()[0] if "categories" in data: for c in data['categories']: - cats.append(c['title']) + cpage=Page(self.site(), c['title']) + cats.append(cpage) # if len(data) == 2: # data = data[0] + data[1] # else: @@ -2218,6 +2219,7 @@
else: allDone = True + print cats return cats
def __cmp__(self, other):
pywikipedia-svn@lists.wikimedia.org