Last modified: 2014-10-07 19:50:25 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/bugs/1443/ Reported by: reza1615 Created on: 2012-05-01 07:56:36 Subject: redirect bug in pagefromfile.py Original description: Hi, pagefromfile.py has two problems 1-when page is redirect it doesn't work 2-for append templates if page has that template it will append I added -noredirect and -nocontents arguments to this patch I made a patch please replace it
- **summary**: redirect bug pagefromfile.py --> redirect bug in pagefromfile.py
*** Bug 55188 has been marked as a duplicate of this bug. ***
nocontents already fixed by me. for noredirect I'll do it
Still happening in master: I used -notitle -appendbottom and when one of the titles contains a redirect the script just exits (silently).
nocontent or nocontents? $ grep nocontent pagefromfile.py -nocontent If page has this statment it dosen't append (example: -nocontents:"{{infobox") dry, nocontents): self.nocontent = nocontents if self.nocontent != u'': if pagecontents.find(self.nocontent) != -1 or pagecontents.find(self.nocontent.lower()) != -1: pywikibot.output(u'Page has %s so it is skipped' % (self.nocontent)) nocontents = u"" elif arg.startswith('-nocontent:'): nocontents = arg[11:] pywikibot.simulate, nocontents)
Change 160023 had a related patch set uploaded by Ladsgroup: [Bug 55198] Add noredirect option and don't let the bot crash in redirects https://gerrit.wikimedia.org/r/160023
Nemo: Can you check this and see it's working properly or not? "nocontent" is better :)
Change 160023 merged by XZise: [Bug 55198] Add noredirect option and don't let the bot crash in redirects https://gerrit.wikimedia.org/r/160023