Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
axel batch bulk download python script
#!/usr/bin/env python
import os
import base64
import time
# Axel is an awesome lightweight linux command line download accelerator,
# this script reads links from a given text file and executes axel
# automating batch/bulk downloads at high speeds
# I plan to add more options to this script when i find time
# enjoy and feel free to fix or use this code
# Coded by CodeFalasi
# Twitter @CodeFalasi
print '[i] Axel batch downloader v 1.0'
userinputfile = raw_input("[?] Text file holding links: ")
print '[!] Answer y for yes or n for no, Case sensative!'
usrchk = raw_input("[?] Does this site require authentication? [y/n] ")
if usrchk == 'y':
username = raw_input('[?] Username: ')
password = raw_input('[?] Password: ')
base64AuthCode = base64.b64encode(username + ':' + password)
print '[i] Running axel with http auth: '
f = open(userinputfile, "r")
for line in'\n'):
cmd = "axel -a -n 20 -H 'Authorization: Basic %s " %base64AuthCode + "' " + line
print '[i] Done...'
print '[i] Running axel '
f = open(userinputfile, "r")
for line in'\n'):
os.system('axel -a -n 20 ' + line )
print '[i] Done...'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment