http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9778
Revision: 9778 Author: multichill Date: 2011-11-23 19:39:58 +0000 (Wed, 23 Nov 2011) Log Message: ----------- First chop up description than do the cleanup.
Modified Paths: -------------- trunk/pywikipedia/flickrripper.py
Modified: trunk/pywikipedia/flickrripper.py =================================================================== --- trunk/pywikipedia/flickrripper.py 2011-11-23 19:23:57 UTC (rev 9777) +++ trunk/pywikipedia/flickrripper.py 2011-11-23 19:39:58 UTC (rev 9778) @@ -155,11 +155,9 @@ if title == u'': description = photoInfo.find('photo').find('description').text if description: - description = cleanUpTitle(description) if len(description)>120: - title = description[0 : 120] - else: - title = description + description = description[0 : 120] + title = cleanUpTitle(description) else: title = u'' # Should probably have the id of the photo as last resort.
pywikipedia-svn@lists.wikimedia.org