sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
Brendan's Avatar

urllib2 HTTPBasicAuthHandler and resumingbroken downloads


Question posted by: Brendan (Guest) on August 21st, 2008 07:45 PM
Is there any way to resume an https file download using urllib2 and an
HTTPBasicAuthHandler?
4 Answers Posted
Gabriel Genellina's Avatar
Gabriel Genellina August 21st, 2008 08:05 PM
Guest - n/a Posts
#2: Re: urllib2 HTTPBasicAuthHandler and resumingbroken downloads

En Thu, 21 Aug 2008 15:37:41 -0300, Brendan <brendandetracey@yahoo.com>
escribi�:
Quote:
Originally Posted by
Is there any way to resume an https file download using urllib2 and an
HTTPBasicAuthHandler?


You should provide the Range header (and probably If-Range too) in the
request.
http://www.w3.org/Protocols/rfc2616...4.html#sec14.35

--
Gabriel Genellina

Brendan's Avatar
Guest - n/a Posts
#3: Re: urllib2 HTTPBasicAuthHandler and resumingbroken downloads

On Aug 21, 3:57*pm, "Gabriel Genellina" <gagsl-...@yahoo.com.ar>
wrote:
Quote:
Originally Posted by
En Thu, 21 Aug 2008 15:37:41 -0300, Brendan <brendandetra...@yahoo.com*
escribi :
>
Quote:
Originally Posted by
Is there any way to resume an https file download using urllib2 and an
HTTPBasicAuthHandler?

>
You should provide the Range header (and probably If-Range too) in the *
request.http://www.w3.org/Protocols/rfc2616...4.html#sec14.35
>
--
Gabriel Genellina


Many thanks for your help.

Ug. Why does everything in Python boil down to reading rfcs? It really
slows us non computer science types down. I'll probably spend a day on
this instead of an hour. I did search the web but had no luck finding
an example, so I posted here as a last resort.
Gabriel Genellina's Avatar
Gabriel Genellina August 22nd, 2008 06:05 PM
Guest - n/a Posts
#4: Re: urllib2 HTTPBasicAuthHandler and resumingbroken downloads

En Fri, 22 Aug 2008 08:55:57 -0300, Brendan <brendandetracey@yahoo.com>
escribi�:
Quote:
Originally Posted by
On Aug 21, 3:57Â*pm, "Gabriel Genellina" <gagsl-...@yahoo.com.ar>
wrote:
Quote:
Originally Posted by
>En Thu, 21 Aug 2008 15:37:41 -0300, Brendan <brendandetra...@yahoo.com>
>Â*
>escribi :
>>
Quote:
Originally Posted by
Is there any way to resume an https file download using urllib2 and an
HTTPBasicAuthHandler?

>>
>You should provide the Range header (and probably If-Range too) in the Â*
>request.http://www.w3.org/Protocols/rfc2616...4.html#sec14.35

>
Ug. Why does everything in Python boil down to reading rfcs? It really
slows us non computer science types down. I'll probably spend a day on
this instead of an hour. I did search the web but had no luck finding
an example, so I posted here as a last resort.


The easy way is to use wget...
If you want a Python example, go to the Python cookbook:
http://code.activestate.com/recipes/langs/python/
enter "resume download" in the search box, and the very first recipe shows
how to use the Range header.

--
Gabriel Genellina

Brendan's Avatar
Guest - n/a Posts
#5: Re: urllib2 HTTPBasicAuthHandler and resumingbroken downloads

On Aug 22, 1:59*pm, "Gabriel Genellina" <gagsl-...@yahoo.com.ar>
wrote:
Quote:
Originally Posted by
En Fri, 22 Aug 2008 08:55:57 -0300, Brendan <brendandetra...@yahoo.com*
escribi :
>
>
>
>
>
Quote:
Originally Posted by
On Aug 21, 3:57*pm, "Gabriel Genellina" <gagsl-...@yahoo.com.ar>
wrote:
Quote:
Originally Posted by
En Thu, 21 Aug 2008 15:37:41 -0300, Brendan <brendandetra...@yahoo.com*
*
escribi :

>
Quote:
Originally Posted by
Quote:
Originally Posted by
Is there any way to resume an https file download using urllib2 and an
HTTPBasicAuthHandler?

>
Quote:
Originally Posted by
Quote:
Originally Posted by
You should provide the Range header (and probably If-Range too) in the*
request.http://www.w3.org/Protocols/rfc2616...4.html#sec14.35

>
Quote:
Originally Posted by
Ug. Why does everything in Python boil down to reading rfcs? It really
slows us non computer science types down. I'll probably spend a day on
this instead of an hour. I did search the web but had no luck finding
an example, so I posted here as a last resort.

>
The easy way is to use wget...
If you want a Python example, go to the Python cookbook:http://code.activestate.com/recipes/langs/python/
enter "resume download" in the search box, and the very first recipe shows *
how to use the Range header.
>
--
Gabriel Genellina- Hide quoted text -
>
- Show quoted text -


Thanks for the link. Much appreciated.
 
Not the answer you were looking for? Post your question . . .
197,047 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 197,047 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors