Thanks! Unfortunately I am not a coder, and have no idea how to implement that, We don't have any coders heavily involved with Appropedia.org (there's always a lot of competition for the attention of socially-minded hackers).
I was going to ask if you could help a bit more with the specifics, but there might be an easier way:
Is there a way I could run the bot, changing the regular pages, and capturing the names of all the redirect page in a file? There might only be 50 or 100 such pages, and I could find another way to handle those (make it into a list of links, open every page, and copy the names of the target pages to a file one by one).
On Thu, November 20, 2008 8:15 am, Chris Watkins wrote:wikipedia.py will return a IsRedirectPage exception with the new page
> Is there a way I can make the bot detect a redirect, follow it, then add
> the category on the new page? Or at least some easier way than looking
> each page up separately and adding the category?
title as exception text. If you catch the exception, read the text (try:
(..) except IsRedirectPage, e: print e.message) and get that page.
For use in category.py you could adapt line 354 and further (except
wikipedia.IsRedirectPage, arg:) to read that page name and act upon it.
Hopefully this answers your question.
Merlijn 'valhallasw' van Deen
Pywikipedia-l mailing list