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).
Thanks again,
Chris
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
wrote:
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.
Best regards,
Merlijn 'valhallasw' van Deen
_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
--
Chris Watkins (a.k.a. Chriswaterguy)
Appropedia.org - Sharing knowledge to build rich, sustainable lives.
blogs.appropedia.org
I like this: five.sentenc.es