Revision: 3898 Author: russblau Date: 2007-07-25 20:19:06 +0000 (Wed, 25 Jul 2007)
Log Message: ----------- Fix regexes that got modified in last revision.
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2007-07-25 20:09:29 UTC (rev 3897) +++ trunk/pywikipedia/wikipedia.py 2007-07-25 20:19:06 UTC (rev 3898) @@ -3491,7 +3491,7 @@ path = self.longpages_address(n=number) get_throttle() html = self.getUrl(path) - entryR = re.compile(ur'<li>(<a href=".+?" title=".+?">hist</a>) <a href=".+?" title="(?P<title>.+?)">.+?</a> [(?P<length>\d+)(.+?)]</li>') + entryR = re.compile(ur'<li>(<a href=".+?" title=".+?">hist</a>) <a href=".+?" title="(?P<title>.+?)">.+?</a> [(?P<length>\d+)(.+?)]</li>') for m in entryR.finditer(html): title = m.group('title') length = int(m.group('length')) @@ -3510,7 +3510,7 @@ path = self.shortpages_address(n = number) get_throttle() html = self.getUrl(path) - entryR = re.compile(ur'<li>(<a href=".+?" title=".+?">hist</a>) <a href=".+?" title="(?P<title>.+?)">.+?</a> [(?P<length>\d+)(.+?)]</li>') + entryR = re.compile(ur'<li>(<a href=".+?" title=".+?">hist</a>) <a href=".+?" title="(?P<title>.+?)">.+?</a> [(?P<length>\d+)(.+?)]</li>') for m in entryR.finditer(html): title = m.group('title') length = int(m.group('length'))