urllib.urlretrieve error

Sam Sungshik Kong ssk at chol.nospam.net
Mon May 24 16:13:07 EDT 2004


Thanks for the reply.

The problem was that url was wrong.
It's not the library's fault...:-)

Thanks again.

Sam

"John J. Lee" <jjl at pobox.com> wrote in message
news:87pt8t1vk6.fsf at pobox.com...
> "Sam Sungshik Kong" <ssk at chol.nospam.net> writes:
>
> > Hello!
>
> Hello!
>
> > I'm trying to download PDF files from web to my computer using urllib.
> > Some pdf files are fine but other files are downloaded only 6kB which is
> > wrong.
> > It didn't show any error message.
> >
> > I use urllib.urlretrieve(url, fn).
> >
> > So I tried to download with Internet Explorer and it worked fine.
> >
> > Anyone knows why?
>
> What was the content of the 6kb file?  Don't assume it was the first
> 6kb of the PDF file: for instance, it may be an HTML page.
>
>
> > My another question is how I can retrieve "mms:..." files.
> > urllib.urlretrieve doesn't work with that protocol.
>
> IIRC, that's a proprietary Microsoft scheme that's designed for
> 'streaming' (ie. downloading and playing back the contents at the same
> time).  I think there's a dodgy C program around somewhere which is
> just about able to grab them, but I don't know of a Python-accessible
> implementation.
>
>
> John





More information about the Python-list mailing list