Python 3 resuma a file download

zljubisic at gmail.com zljubisic at gmail.com
Tue Jun 30 11:34:24 EDT 2015


Hi,

I would like to download a file (http://video.hrt.hr/2906/otv296.mp4)

If the connection is OK, I can download the file with:

import urllib.request
urllib.request.urlretrieve(remote_file, local_file)

Sometimes when I am connected on week wireless (not mine) network I get WinError 10054 exception (windows 7).

When it happens, I would like to resume download instead of doing everything from very beginning.

How to do that?

I read about Range header and chunks, but this server doesn't have any headers.

What options do I have with this particular file?

Regards.



More information about the Python-list mailing list