Bugs item #3471487, was opened at 2012-01-09 11:13 Message generated for change (Comment added) made by binbot You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3471487...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: archivebot.py not working on dewikinews
Initial Comment: 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
----------------------------------------------------------------------
Comment By: Bináris (binbot)
Date: 2012-02-23 00:27
Message: 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.
----------------------------------------------------------------------
Comment By: Werieth (werieth) Date: 2012-02-22 16:13
Message: 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
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody) Date: 2012-02-22 14:57
Message: 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)
----------------------------------------------------------------------
Comment By: Bináris (binbot) Date: 2012-02-14 03:20
Message: 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.
----------------------------------------------------------------------
Comment By: Bináris (binbot) Date: 2012-02-14 03:11
Message: Had it previously worked? If so, when did stop? What is the bot name that archives?
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603138&aid=3471487...
pywikipedia-bugs@lists.wikimedia.org