Last modified: 2013-12-24 18:30:26 UTC
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
Dump of the verbose output of archivebot.py
Had it previously worked? If so, when did stop? What is the bot name that archives?
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.
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\)
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
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.
I think this should be fixed by Iede5165fd36b8e5747db032183094fa11177b037