Revision: 5618 Author: leogregianin Date: 2008-06-23 17:30:13 +0000 (Mon, 23 Jun 2008)
Log Message: ----------- 1944723 fix imagelinks() bug in wikipedia.py. Add more file types by shizhao
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2008-06-23 17:19:10 UTC (rev 5617) +++ trunk/pywikipedia/wikipedia.py 2008-06-23 17:30:13 UTC (rev 5618) @@ -1657,7 +1657,7 @@ results.append(page) if loose: ns = getSite().image_namespace() - imageR = re.compile('\w\w\w+.(?:gif|png|jpg|jpeg|svg)', re.IGNORECASE) + imageR = re.compile('\w\w\w+.(?:gif|png|jpg|jpeg|svg|JPG|xcf|pdf|mid|ogg|djvu)', re.IGNORECASE) for imageName in imageR.findall(pageText): results.append(ImagePage(self.site(), ns + ':' + imageName)) return list(set(results))
pywikipedia-l@lists.wikimedia.org