On 09/14/2011 07:57 PM, Marcin Cieslak wrote:
estrangeiro estrangeiro@riseup.net wrote:
Hi! First, I do realize that the problem that I'm gonna show you following is probably easy to fix, but, well, I'm not so in to python yet. Second, it appears to me that it is a problem that could affect more people than me, since the task I'm trying to execute is not that uncommon, I think, so if it were fixed it would help... more than one. =)
Here is the deal:
I'm trying to upload all the images from this page:
http://pt.wikipedia.org/wiki/Portal:Anarquia/Acervo_de_imagens
This script was pretty broken. I have fixed this a bit so you can use "-justshown" option to fetch images from your wikipage.
This script does not understand the concept of description pages (it thinks that everything ending in .png and .jpeg is an image), so if you try to use it with "-shown" or without an option it will try to download "/wiki/File:Image.png" description pages too.
Anyway, r9525 should work at least to let you download the images displayed on this page - which is probably what you want.
//Saper
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Thank you very much, Saper, the script almost done it. But it is not there, yet. The bot does everything fine, except that, when it seems to be at the final step, an unicode problem message is shown: "'ascii' codec can't decode byte 0xff in position 768: ordinal not in range(128)".
Well, I've looked at the Python documentation http://docs.python.org/howto/unicode.html to see more or less what I have to do to solve it, but without any "harvest".
Sorry if I'm being too insistent.