http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10473
Revision: 10473 Author: xqt Date: 2012-08-04 16:28:25 +0000 (Sat, 04 Aug 2012) Log Message: ----------- enable archivebot.py for ro.wikipedia, patch submitted by acstroe. Thanks.
Modified Paths: -------------- trunk/pywikipedia/archivebot.py
Modified: trunk/pywikipedia/archivebot.py =================================================================== --- trunk/pywikipedia/archivebot.py 2012-08-04 14:21:41 UTC (rev 10472) +++ trunk/pywikipedia/archivebot.py 2012-08-04 16:28:25 UTC (rev 10473) @@ -230,6 +230,9 @@ # 14:23, 12. Jan. 2009 (UTC) pat = re.compile(r'(\d\d):(\d\d), (\d\d?). (\S+).? (\d\d\d\d) ((?:UTC|CES?T))') TM = pat.search(line) +# ro.wiki: 4 august 2012 13:01 (EEST) + if not TM: + TM = re.search(r'(\d\d?) (\S+) (\d\d\d\d) (\d\d):(\d\d) (.*?)', line) if TM: TIME = txt2timestamp(TM.group(0),"%d. %b %Y kl. %H:%M (%Z)") if not TIME: @@ -253,6 +256,8 @@ if not TIME: TIME = txt2timestamp(TM.group(0),"%d. %Bta %Y kello %H.%M (%Z)") if not TIME: + TIME = txt2timestamp(TM.group(0),"%d %B %Y %H:%M (%Z)") + if not TIME: TIME = txt2timestamp(re.sub(' *([^ ]+) *', '', TM.group(0)), "%H:%M, %d. %b. %Y") if TIME: self.timestamp = max(self.timestamp, time.mktime(TIME))