Skip to content

Instantly share code, notes, and snippets.

@kohfuchs
Last active January 3, 2020 19:58
Show Gist options
  • Save kohfuchs/ee3a859392d83904a4006e1d3f0fbed9 to your computer and use it in GitHub Desktop.
Save kohfuchs/ee3a859392d83904a4006e1d3f0fbed9 to your computer and use it in GitHub Desktop.
Download list of links in python with wget
#!/usr/bin/python3
import wget
import argparse
parser = argparse.ArgumentParser(description='Download files via .list file')
parser.add_argument('list', help='.list file')
parser.add_argument('--path' , help='path to save your outputfile')
arg = parser.parse_args()
data = open(arg.list).read().splitlines()
path = arg.path
for d in data:
url = d
wget.download(url, path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment