Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > urllib.urlretrieve error

Reply
Thread Tools

urllib.urlretrieve error

 
 
Sam Sungshik Kong
Guest
Posts: n/a
 
      05-22-2004
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?


My another question is how I can retrieve "mms:..." files.
urllib.urlretrieve doesn't work with that protocol.

Thanks.

Sam


 
Reply With Quote
 
 
 
 
John J. Lee
Guest
Posts: n/a
 
      05-24-2004
"Sam Sungshik Kong" <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
 
Sam Sungshik Kong
Guest
Posts: n/a
 
      05-24-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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Sam Sungshik Kong" <(E-Mail Removed)> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xffc Thread 0x228 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 0 03-30-2006 03:16 PM
Error connecting to SQLExpress 2005 locally (error: 26 - Error Locating Server/Instance Specified) hfk0 ASP .Net 2 03-27-2006 08:43 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 1 03-24-2006 04:20 PM
ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x8fc Thread 0x934 DBC 0x437b94 Jet'. ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr bazzer ASP .Net 0 03-24-2006 02:22 PM
Error 500: ERROR: Cannot forward. Writer or Stream already obtained. Error JavaQueries Java 1 03-01-2005 06:30 PM



Advertisments