Revision: 7969 Author: xqt Date: 2010-02-26 18:08:20 +0000 (Fri, 26 Feb 2010)
Log Message: ----------- remove old code stuff; no longer supported by mw.
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2010-02-26 17:57:24 UTC (rev 7968) +++ trunk/pywikipedia/wikipedia.py 2010-02-26 18:08:20 UTC (rev 7969) @@ -5904,27 +5904,11 @@ get_throttle() html = self.getUrl(path)
- entryR = re.compile(ur'<li><a href=".+?" title="(?P<title>.+?)">.+?</a>' -# '<br />(?P<match>.*?)<span style="color[^>]*>.+?: ' -# '(?P<relevance>[0-9.]+)% - ' -# '(?P<size>[0-9.]*) ' -# '(?P<sizeunit>[A-Za-z]) ' -# '((?P<words>.+?) \w+) - ' -# '(?P<date>.+?)</span></li>' - , re.DOTALL) + entryR = re.compile(ur'<li><a href=".+?" title="(?P<title>.+?)">.+?</a>', + re.DOTALL)
for m in entryR.finditer(html): page = Page(self, m.group('title')) - #match = m.group('match') - #relevance = m.group('relevance') - #size = m.group('size') - ## sizeunit appears to always be "KB" - #words = m.group('words') - #date = m.group('date') - - #print "%s - %s %s (%s words) - %s" % (relevance, size, sizeunit, words, date) - - #yield page, match, relevance, size, words, date yield page, '', '', '', '', ''
# TODO: avoid code duplication for the following methods
pywikipedia-svn@lists.wikimedia.org