https://bugzilla.wikimedia.org/show_bug.cgi?id=55223
Web browser: --- Bug ID: 55223 Summary: archivebot.py not working on dewikinews Product: Pywikibot Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: legoktm.wikipedia@gmail.com Classification: Unclassified Mobile Platform: ---
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1391/ Reported by: Anonymous user Created on: 2012-01-09 19:13:59 Subject: archivebot.py not working on dewikinews Original description: As the title says, archivebot.py is not working on dewikinews, without an error message. Using verbose output (adding import wikipedia; wikipedia.verbose = 1) you can see that it doesn't even try to change pages, although there are changes that need to be done (I've added that as attachment, the output goes on like the last two for all pages out of http://de.wikinews.org/wiki/Spezial:Linkliste/Vorlage:Autoarchiv and exits then). The script is running on the toolserver, version.py: hoo@willow:~/pywikipedia$ python version.py Pywikipedia [http] trunk/pywikipedia (r9822, 2012/01/04, 08:38:45) Python 2.7.1 (r271:86832, Jan 4 2011, 13:57:14) [GCC 4.5.2] config-settings: use_api = True use_api_login = True unicode test: ok
https://bugzilla.wikimedia.org/show_bug.cgi?id=55223
--- Comment #1 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- Dump of the verbose output of archivebot.py
https://bugzilla.wikimedia.org/show_bug.cgi?id=55223
--- Comment #2 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- Had it previously worked? If so, when did stop? What is the bot name that archives?
https://bugzilla.wikimedia.org/show_bug.cgi?id=55223
--- Comment #3 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- I guess from the German keywords in http://de.wikinews.org/wiki/Vorlage:Autoarchiv that are not part of the framework, you may use an individual code. If so, please try to rewrite the template keywords to original English parameters on some talk pages, and run the official distribution to see if it works. Individually modified scripts are not in the scope of Pywiki team.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55223
--- Comment #4 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- Yes, it used to work, see https://de.wikinews.org/wiki/Spezial:Beitr%C3%A4ge/Archiver
They only switched the layout after I gave with pywp (https://de.wikinews.org/w/index.php?diff=617692&oldid=403682%5C)
https://bugzilla.wikimedia.org/show_bug.cgi?id=55223
--- Comment #5 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- Its due to an issue with the timestamp that is used on their wiki. I am not sure if this will work 100% but here is the patch:
Index: archivebot.py =================================================================== --- archivebot.py (revision 9923) +++ archivebot.py (working copy) @@ -233,6 +233,8 @@ if not TM: TM = re.search(r'(\d\d?)\. (\S+) (\d\d\d\d) kello \W*(\d\d).(\d\d) \(.*?\)', line) if not TM: + TM = re.search(r'(\d\d):(\d\d), (\d\d?)\. (\S+)\.? (\d\d\d\d) \(.*?\)', line) + if not TM: # 14:23, 12. Jan. 2009 (UTC) pat = re.compile(r'(\d\d):(\d\d), (\d\d?)\. (\S+)\.? (\d\d\d\d) \(UTC\)') TM = pat.search(line) @@ -240,6 +242,8 @@ # pywikibot.output(TM) TIME = txt2timestamp(TM.group(0),"%d. %b %Y kl. %H:%M (%Z)") if not TIME: + TIME = txt2timestamp(TM.group(0),"%H:%M, %d. %b. %Y (CEST)") + if not TIME: TIME = txt2timestamp(TM.group(0), "%Y. %B %d., %H:%M (%Z)") if not TIME: TIME = txt2timestamp(TM.group(0),"%d. %b %Y kl.%H:%M (%Z)") @@ -263,9 +267,9 @@ TIME = txt2timestamp(TM.group(0),"%H:%M, %d. %b. %Y (%Z)") if TIME: self.timestamp = max(self.timestamp,time.mktime(TIME)) -# pywikibot.output(u'Time to be parsed: %s' % TM.group(0)) -# pywikibot.output(u'Parsed time: %s' % TIME) -# pywikibot.output(u'Newest timestamp in thread: %s' % TIME) + # pywikibot.output(u'Time to be parsed: %s' % TM.group(0)) + # pywikibot.output(u'Parsed time: %s' % TIME) + # pywikibot.output(u'Newest timestamp in thread: %s' % TIME)
def size(self): return len(self.title) + len(self.content) + 12
https://bugzilla.wikimedia.org/show_bug.cgi?id=55223
--- Comment #6 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- Has the timestamp format changed? That would be a primary information. When, how? In the first run, Der_Hausgeist and Giftpflanze should be asked (or are you any of them?) Anyhow, as the official version of archivebot.py does not contain German keywords, and the i18n file contains only German edit summaries, not localized parameters, this must be an individual script. Please try to run the official distribution with Englis keywords and report if it works.
https://bugzilla.wikimedia.org/show_bug.cgi?id=55223
Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://sourceforge.net/p/p | |ywikipediabot/bugs/1391
https://bugzilla.wikimedia.org/show_bug.cgi?id=55223
Merlijn van Deen valhallasw@arctus.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #7 from Merlijn van Deen valhallasw@arctus.nl --- I think this should be fixed by Iede5165fd36b8e5747db032183094fa11177b037
pywikipedia-bugs@lists.wikimedia.org