I can do this in c#, and the code is pretty long.
Would be cool if someone can show me how this would be done via python.
Pseudo code is:
u
Here is a slightly modified version of WoLpH's script for Python 3.3.
#!/usr/bin/python3.3
import os.path
import urllib.request
links = open('links.txt', 'r')
for link in links:
link = link.strip()
name = link.rsplit('/', 1)[-1]
filename = os.path.join('downloads', name)
if not os.path.isfile(filename):
print('Downloading: ' + filename)
try:
urllib.request.urlretrieve(link, filename)
except Exception as inst:
print(inst)
print(' Encountered unknown error. Continuing.')