[axel-devel] Announce: wget2axel.py

Ian Munsie darkstarsword at gmail.com
Fri Jun 28 03:53:44 UTC 2013


Hey everyone,

Yesterday I hacked together a script to create an axel state file for
a file partially downloaded outside of axel (e.g. with wget or a web
browser), so that it can be resumed with axel.

It's in my junk code on github here -
https://raw.github.com/DarkStarSword/junk/master/wget2axel.py

It doesn't have any polish yet (I only hacked it up because it was
faster than redownloading the first part of the file that I already
had), so it doesn't have any built in usage and there are no doubt a
lot of edge cases that it doesn't handle properly (redirects, anything
other than http[s]) yet, but it did the trick for me and might be
useful to others.

It's fairly straightforward to use - give it the URL as the first
parameter, and the filename of the partially downloaded file as the
second. It does a http HEAD on the URL to find the total size and
prints out a bunch of debugging to show what connection ranges it
generates (it calculates enough connections such that there will be 4
to 5 connections that cover the undownloaded part of the file). Then
point axel at the same URL and it should pick up the state file and
resume the download.

I've used it a couple of times and was able to verify the checksum of
the file afterwards - I'd still recommend verifying the checksums
whenever possible in case there's some edge case I missed.

Of course it won't help you if the server doesn't support resuming
downloads - there's no magic here.

Cheers,
-Ian

-- 
http://sites.google.com/site/DarkStarJunkSpace
--
http://darkstarshout.blogspot.com/
--
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



More information about the axel-devel mailing list