Thanks! Yes I did see that code but didn't know what to do.
I'll try removing it and see how it goes.
________________________________ From: Bináris wikiposta@gmail.com To: Eric K ek79501@yahoo.com; Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Sent: Tuesday, January 24, 2012 1:52 AM Subject: Re: [Pywikipedia-l] Need help for: Page rename / insert text / update links
2012/1/24 Eric K ek79501@yahoo.com
2. A category needs to be added for all redirects that have a certain regex (its the same as above: ".*[^\w\s-].*" ) The problem I'm facing with the add text.py bot, is that it doesnt add text to redirects (hence, it cannot add a category to a redirect). When it gets to a redirect, it automatically skips it. I might be wrong in my findings but this is what I ran into.
Eric, feel free to modify scripts to your own needs. As you wrote, you are famailiar with programming, and Python is an easy-to-understand language. Open add_text.py for editing, and search "redir". You will find it at one place:
except pywikibot.IsRedirectPage: pywikibot.output(u"%s is a redirect, skip!" % page.title()) return (False, False, always) # continue
Delete these three lines, and try to run it again. I am not 100% sure this is enough (not tested) but I hope so. Modifying teh code is often easier and takes the fraction of time than to run numerous experiments with the "legal" parameters. You may want to make a backup, but the original is always available from the net. Note that Pywiki scripts use Unix-style linebrekas, so if you have Windos, you will have to use a proper editor instead of notepad (e.g. Notepad++) or change the newlines to CRLF.