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
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 Sat, Nov 22, 2008 at 14:57, Merlijn van Deen <valhallasw(a)arctus.nl>wrote;wrote:
On Thu, November 20, 2008 8:15 am, Chris Watkins
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?
wikipedia.py will return a IsRedirectPage exception with the new page
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
Chris Watkins (a.k.a. Chriswaterguy)
- Sharing knowledge to build rich, sustainable lives.
I like this: five.sentenc.es