Last active
January 3, 2020 19:58
-
-
Save kohfuchs/ee3a859392d83904a4006e1d3f0fbed9 to your computer and use it in GitHub Desktop.
Download list of links in python with wget
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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