Problem using urllib to download images

tstrogen at googlemail.com tstrogen at googlemail.com
Mon Nov 3 11:48:01 EST 2008


I am using Python 2.6 on Mac OS 10.3.9.
I have been trying to use:
image = urllib.URLopener()
image.retrieve(url, filename)
to download images from websites. I am able to do so, and end up with
the appropriate file. However, when I try to open the file, I get an
error message. It's something about corrupted data, and an
unrecognised file.
Anyone know what I'm talking about/had similar experiences?
-Taidgh



More information about the Python-list mailing list