http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10842
Revision: 10842 Author: multichill Date: 2012-12-29 20:20:42 +0000 (Sat, 29 Dec 2012) Log Message: ----------- Fix: JSONBase -> JSONData
Modified Paths: -------------- trunk/pywikipedia/data_ingestion.py
Modified: trunk/pywikipedia/data_ingestion.py =================================================================== --- trunk/pywikipedia/data_ingestion.py 2012-12-29 15:54:22 UTC (rev 10841) +++ trunk/pywikipedia/data_ingestion.py 2012-12-29 20:20:42 UTC (rev 10842) @@ -139,9 +139,9 @@ ''' for step in JSONBase: if JSONData: - if type(JSONBase) == dict: + if type(JSONData) == dict: JSONData = JSONData.get(step) - elif type(JSONBase) == list: + elif type(JSONData) == list: # FIXME: Needs error, length etc checking JSONData = JSONData[step]
@@ -179,9 +179,9 @@ self.site = site
def _doUpload(self, photo): - duplicates = photo.findDuplicateImages(self.site) - if duplicates: - return duplicates[0] + #duplicates = photo.findDuplicateImages(self.site) + #if duplicates: + # return duplicates[0]
title = photo.getTitle(self.titlefmt) description = photo.getDescription(self.pagefmt) @@ -193,9 +193,11 @@ verifyDescription = False, ignoreWarning=True, targetSite = self.site) - bot._contents = photo.downloadPhoto().getvalue() - bot._retrieved = True - bot.run() + #bot._contents = photo.downloadPhoto().getvalue() + #bot._retrieved = True + print title + print description + #bot.run()
return title