Downloader with Internet Download Manager (Windows)
Install and update using pip:
$ pip install idm
idm supports Python 2 and newer, Python 3 and newer, and PyPy.
What does it look like? Here is an example of a simple pyidm program:
from idm import IDMan
downloader = IDMan()
url = "http://test.com/test.exe"
downloader.download(url, r"c:\DOWNLOADS", output=None, referrer=None, cookie=None, postData=None, user=None, password=None, confirm=False, lflag=None, clip=False)
And it will open "Internet Download Manager (IDM)"
or run on terminal
$ python idm.py "http://test.com/test.exe" -p C:\DOWNLOADS -o test_output.exe
Example use with headers as postData and cookies:
from idm import IDMan
downloader = IDMan()
url = "http://test.com/test.exe"
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3',
'Authorization': "Bearer KN9WW7k5gKgCnQLpnmWWM7LytAuSUwb9",
'Cookie': 'accountToken=KN9WW7k5gKgCnQLpnmWWM7LytAuSUwb9',
}
cookies = {
'accountToken': 'KN9WW7k5gKgCnQLpnmWWM7LytAuSUwb9'
}
downloader.download(url, r"c:\DOWNLOADS", output=None, referrer=None, cookie=cookie, postData=headers, user=None, password=None, confirm=False, lflag=None, clip=False)
- Python 2.7+, Python 3.x
- Windows (only), for Linux you can't use pywget (pip install pywget)
- License: GPL
- Code: https://github.com/cumulus13/pyidm
- Issue tracker: https://github.com/cumulus13/pyidm/issues