Bugs item #2208999, was opened at 2008-10-30 06:00 Message generated for change (Settings changed) made by a_engels You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2208999...
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: General Group: None
Status: Closed Resolution: Fixed
Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: yo.wiki incorrectly throws NoPage errors
Initial Comment: version.py results: Pywikipedia [http] trunk/pywikipedia (r6044, Oct 29 2008, 20:12:04) Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)]
Trying read a Yoruba wikipedia article always fails with NoPage error. It appear that yo.wiki is setup with a linefeed in the "History" tab text. The fix is to use a re.DOTALL flag when searching for the history page.
My patch:
def _getEditPage()
... # Find out if page actually exists. Only existing pages have a # version history tab. if self.site().family.RversionTab(self.site().language()): # In case a family does not have version history tabs, or in # another form RversionTab = re.compile(self.site().family.RversionTab(self.site().language()), re.DOTALL) else: RversionTab = re.compile(r'<li id="ca-history"><a href=".*?title=.*?&action=history".*?>.*?</a></li>', re.DOTALL) matchVersionTab = RversionTab.search(text) if not matchVersionTab: raise NoPage(self.site(), self.aslink(forceInterwiki = True))
...
----------------------------------------------------------------------
Comment By: Andre Engels (a_engels) Date: 2008-11-03 08:39
Message: 6052
----------------------------------------------------------------------
Comment By: Andre Engels (a_engels) Date: 2008-11-03 08:39
Message: Fixed in r...
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2208999...