473,385 Members | 2,274 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

urllib2 HTTPBasicAuthHandler and resumingbroken downloads

Is there any way to resume an https file download using urllib2 and an
HTTPBasicAuthHandler?
Aug 21 '08 #1
4 2110
En Thu, 21 Aug 2008 15:37:41 -0300, Brendan <br*************@yahoo.com>
escribi�:
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/....html#sec14.35

--
Gabriel Genellina

Aug 21 '08 #2
On Aug 21, 3:57*pm, "Gabriel Genellina" <gagsl-...@yahoo.com.ar>
wrote:
En Thu, 21 Aug 2008 15:37:41 -0300, Brendan <brendandetra...@yahoo.com*
escribi :
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/....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.
Aug 22 '08 #3
En Fri, 22 Aug 2008 08:55:57 -0300, Brendan <br*************@yahoo.com>
escribi�:
On Aug 21, 3:57Â*pm, "Gabriel Genellina" <gagsl-...@yahoo.com.ar>
wrote:
>En Thu, 21 Aug 2008 15:37:41 -0300, Brendan <brendandetra...@yahoo.com>
Â*
escribi :
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/....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

Aug 22 '08 #4
On Aug 22, 1:59*pm, "Gabriel Genellina" <gagsl-...@yahoo.com.ar>
wrote:
En Fri, 22 Aug 2008 08:55:57 -0300, Brendan <brendandetra...@yahoo.com*
escribi :


On Aug 21, 3:57*pm, "Gabriel Genellina" <gagsl-...@yahoo.com.ar>
wrote:
En Thu, 21 Aug 2008 15:37:41 -0300, Brendan <brendandetra...@yahoo.com*
*
escribi :
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/....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- Hide quoted text -

- Show quoted text -
Thanks for the link. Much appreciated.
Aug 25 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: O. Koch | last post by:
Until now, i know that ftplib doesn't support proxies and that i have to use urllib2. But i don't know how to use the urllib2 correct. I found some examples, but i don't understand them. Is...
2
by: Andre Bocchini | last post by:
I'm having some trouble using proxy authentication. I can't figure out how to authenticate with a Squid proxy. I know for a fact the proxy is using Basic instead of Digest for the authentication....
4
by: bmiras | last post by:
I've got a problem using urllib2 to get a web page. I'm going through a proxy using user/password authentification and i'm trying to get a page asking for a HTTP authentification. And I'm using...
5
by: Pascal | last post by:
Hello, I want to acces my OWA (Outlook Web Acces - http Exchange interface) server with urllib2 but, when I try, I've always a 401 http error. Can someone help me (and us)? Thanks. ...
1
by: Fuzzyman | last post by:
I'm trying to do Basic authentication using urllib2 and HTTPPasswordMgr Objects. According to my understanding I ought to perform the following simple sequence (except it doesn't work). Can...
1
by: Ray Slakinski | last post by:
Hello, I have defined a function to set an opener for urllib2, this opener defines any proxy and http authentication that is required. If the proxy has authencation itself and requests an...
2
by: mrstephengross | last post by:
I'm working on learning how to use urllib2 to use a proxy server. I've looked through the postings on this group, and it's been helpful. I have not, however, found complete documentation on the...
3
by: m.banaouas | last post by:
Hi all, I started to use urllib2 library and HTTPBasicAuthHandler class in order to authenticate with a http server (Zope in this case). I don't know why but it doesn't work, while authenticating...
1
by: Alessandro Fachin | last post by:
I write this simply code that should give me the access to private page with htaccess using a proxy, i don't known because it's wrong... import urllib,urllib2 #input url...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.