Revision: 5406 Author: filnik Date: 2008-05-19 13:26:19 +0000 (Mon, 19 May 2008)
Log Message: ----------- Little fix
Modified Paths: -------------- trunk/pywikipedia/query.py
Modified: trunk/pywikipedia/query.py =================================================================== --- trunk/pywikipedia/query.py 2008-05-19 13:10:56 UTC (rev 5405) +++ trunk/pywikipedia/query.py 2008-05-19 13:26:19 UTC (rev 5406) @@ -15,7 +15,7 @@ 'rvprop' :'user|timestamp|content', }
- print query.GetData('en', params, + print query.GetData(params, useAPI = True, encodeTitle = False)
finally: @@ -41,10 +41,11 @@
import wikipedia, simplejson, urllib, time
-def GetData(lang, params, verbose = False, useAPI = False, retryCount = 5, encodeTitle = True): +def GetData(params, site = None, verbose = False, useAPI = False, retryCount = 5, encodeTitle = True): """Get data from the query api, and convert it into a data object """ - site = wikipedia.getSite(lang) + if site == None: + site = wikipedia.getSite()
for k,v in params.iteritems(): if not IsString(v):