Scripts Index
Related Topics
Popular Trends
Trending Topics
Python File Management  

Resuming download of a file

download download home home   report broken
important script information
company name:
code.activestate.com
license: Free
minimum requirements: Python
functional limitations:
Resuming download of a file description


This script shows how to resume downloading of a file that has been partially downloaded from a web server. It's been tested with Apache 1.3.x, but should work with any web server that understands the "range" header.This script uses the extra header - "Range" to let the web server know that we only want a certian range of data to be downloaded. The server must support this, but this is part of the HTTP1.1 spec, so it should be widely supported.

I essentially use the urllib.FancyURLopener to do all the dirty work of adding a new header and doing the normal handshaking. I just had to let it know that the "error" 206 is not really an error - just continue to proceed normally.

I also do some extra checks to quit the download if I've already downloaded the whole file.

Check out the HTTP1.1 RFC to learn more about what the headers mean. The script should probably do a check to make sure the web server accepts "range" but that is pretty simple to do.



Relates:
File - Download - Resume - Download File - Download Resume - Resume File
Similar scripts
Convert PDF to TIFF (Popularity: ) : This script is a very short code snippet illustrating how to convert individual pages of PDF documents to TIFF files, one TIFF file per page. It works only on Mac OS X with PyObjC installed.As a recipe the code is ...
Count PDF pages (Popularity: ) : Count PDF pages script is a simple way to count the pages of a PDF the pure Python way.
Counting pages of PDF documents on Mac OS X (Popularity: ) : Given that PDF is a "native" data format on Mac OS X, it is very easy to get access to some properties of such documents. One is the number of pages. Using Python the necessary code to do this is ...
Iterate over .MP4 atoms (Popularity: ) : This script yields the atoms contained in an MP4 file. Mostly is used for extracting the tags contained in it (artist, title etc) using a convenience class (M4ATags). This script could be implemented as an generator.
Counting pages of PDF documents on Mac O (Popularity: ) : Given that PDF is a "native" data format on Mac OS X, it is very easy to get access to some properties of such documents. One is the number of pages. Using Python the necessary code to do this is ...
Disk (Popularity: ) : This script provides a simple simulation of secondary memory and is primarily designed to provide a driver interface to a virtual hard drive. The interface is simple and allows the simulation of IO errors. Also provided are methods that allow ...
Cross Platform Excel Parsing With Xlrd (Popularity: ) : This script easily extract data from microsoft excel files using this wrapper class for xlrd. The class allows you to create a generator which returns excel data one row at a time as either a list or dictionary. This script ...
A Singleton log file creator (Popularity: ) : This class is a basic Singleton log file creator. It allows separate classes/modules to log their activities to the same file (even the same line if they want to).This is a quite basic log file creator, intended to assist in ...
Backup your files (Popularity: ) : Backup your files script makes backup versions for your files.It can be used for non-python source code also.
A Python script to test download mirrors (Popularity: ) : The concept of the script is straightforward: read the mirrors page from RedHat's web site, make a list of all the mirrors, test how long it takes to download from each, and present a sorted list of the results.

The first ...

User reviews

Write a review:
1 2 3 4 5 6 7 8 9 10
1=poor 10=excellent
Write review*
Your name*
Email*
  (Comments are moderated, and will not appear on this site until the editor has approved them)
 
Similar Software
Download Extract OST File (Popularity: ) : Download Extract OST File is best OST recovery tool to recover complete OST data in Outlook PST file to recover CC, BCC, date and time. There are more feature of this software *Quickly Download Extract OST file to PST. *Download ...
Download Recover EDB File (Popularity: ) : Just download Exchange recovery tool to recover EDB file from corrupted Exchange servers instantly. Well features based Enstella EDB to PST recovery tool easily fix corrupt EDB file and recover Exchange database to PST format in a correct manner. In ...
Download Microsoft PST File Recovery (Popularity: ) : If you have any doubt about how to recover Microsoft Outlook file and how to restore Outlook emails? So just search PDS Download Microsoft PST file recovery tool which presented by PerfectDataSolutions utility group. Through this Download PST repair software ...
Story of a Lost Sky (Popularity: ) : Story of a Lost Sky is a strategy RPG in the vein of Fire Emblem / Final Fantasy Tactics based on the Touhou series.. featheredmelody / Lost Sky Project (Public) / wiki / Home — bitbucket.org.
Hashy - A file checksum tool (Popularity: ) : The easiest way to generate MD5, SHA1, SHA256 and SHA512 checksums! Simple drag the a file into the application and the checksum will be instantly generated. Along with the simple 'copy to clipboard' button, it could not be easier!<br /><br ...
Video Converter Free Download (Popularity: ) : Convert your videos free to AVI, MP4, WMV, MKV, MPEG, SWF, FLV, 3GP, RM, GIF and other popular formats with Video Converter Free Download. This software has intuitive wizard-based interface, very easy to operate. If you wish to transfer video ...
AmazingDown (Popularity: ) : AmazingDown is a tool to increase download speeds by up to 500 percent, resume,schedule downloads and management of downloaded files.Even you can rate every download role from 1 star to 5 star. supports many kinds of Proxy,Such as socks4,socks5...,The strong ...
SiteUnseen (Popularity: ) : SiteUnseen From ITC InterNetworks. The easy to use website content analyzer and download manager parses HTML and JavaScript in web pages, finding, downloading and saving any user specified file type(s), jpg, mp3, mpg, etc. SiteUnseen will spider a site regardless ...
Hercules Game Theater XP Driver 2007.CSND.1 for Windows XP/Vista (Popularity: ) : Supported Operating Systems :

Windows XP : (Service Pack 2 (SP2) necessary)
Windows Vista x86 (32 Bits)

• Windows Vista™ Home Basic
• Windows Vista™ Home Premium
• Windows Vista™ Ultimate
• Windows Vista™ Enterprise
• Windows Vista™ Business

Content :
Driver version: 4102
CPL (Control Panel) version: 1.51

Changes :

- ...

Hercules Digifire 7.1 Driver 2007.CSND.1 for Windows XP/Vista (Popularity: ) : Supported Operating Systems :

Windows XP : (Service Pack 2 (SP2) necessary)
Windows Vista x86 (32 Bits)

• Windows Vista™ Home Basic
• Windows Vista™ Home Premium
• Windows Vista™ Ultimate
• Windows Vista™ Enterprise
• Windows Vista™ Business

Content :
Driver version: 4102
CPL (Control Panel) version: 1.51

Changes :

- ...

ad


Rate me
supported os
All
stats
downloads 12
version 1.1
size in Kb
popularity   
1447/377376
user rating 5/10
New Scripts
Popular Scripts
Latest Reviews