Bugs item #3018240, was opened at 2010-06-18 19:32 Message generated for change (Comment added) made by russblau You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3018240...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: rewrite Group: None
Status: Closed Resolution: Fixed
Priority: 5 Private: No Submitted By: Nakor Wikipedia (nakor-wikipedia) Assigned to: Russell Blau (russblau) Summary: [pywikibot] page.getReferences returns incorrect list
Initial Comment: Hello,
Try below code in pywikipedia (you ahve to set your bot to go on fr.wiki):
#!/usr/bin/python # -*- coding: utf-8 -*- import wikipedia site = wikipedia.getSite() page = wikipedia.Page(site, u'Modèle:Suppression') referencesGenerator=page.getReferences(follow_redirects=False, withTemplateInclusion=False, onlyTemplateInclusion=False, redirectsOnly=True) print len(list(referencesGenerator))
result is correct: 7 pages redirecting to that one
Now run the following code using pywikibot:
#!/usr/bin/python # -*- coding: utf-8 -*- import pywikibot site = pywikibot.getSite() page = pywikibot.Page(site, u'Modèle:Suppression') referencesGenerator=page.getReferences(follow_redirects=False, withTemplateInclusion=False, onlyTemplateInclusion=False, redirectsOnly=True) print len(list(referencesGenerator))
result is incorrect: 1681
----------------------------------------------------------------------
Comment By: Russell Blau (russblau)
Date: 2010-06-22 15:50
Message: Fixed in r8312
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3018240...