Skip to main content

Downloader with Internet Download Manager (Windows)

Project description

idm

Downloader with Internet Download Manager (Windows)

Installing

Install and update using pip:

$ pip install idm

idm supports Python 2 and newer, Python 3 and newer, and PyPy.

Example

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", "test_output.exe")

And "Internet Download Manager (IDM)" will open then immediately download the URL

or run on terminal/cmd

> python idm.py "http://test.com/test.exe" -p C:\DOWNLOADS -o test_output.exe -c -ua "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36" -r "http://test.com/test.exe" -U admin -P admin123 -D "Authorization=Bearer KN9WW7k5gKgCnQLpnmWWM7LytAuSUwb9\nCookie=accountToken=KN9WW7k5gKgCnQLpnmWWM7LytAuSUwb9" -C "accountToken=KN9WW7k5gKgCnQLpnmWWM7LytAuSUwb9;"

Example use with headers as postData, cookies and other parameters:

from idm import IDMan

downloader = IDMan()
url = "http://test.com/test.exe"

headers = { 
    'Authorization': "Bearer KN9WW7k5gKgCnQLpnmWWM7LytAuSUwb9",
    'Cookie': 'accountToken=KN9WW7k5gKgCnQLpnmWWM7LytAuSUwb9',
}
cookies = {
    'accountToken': 'KN9WW7k5gKgCnQLpnmWWM7LytAuSUwb9'
}

username = "admin"
password = "admin123"
confirm = True
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"

downloader.download(url, r"c:\DOWNLOADS", "test_output.exe", "http://test.com/test.exe", cookie, headers, username, password, confirm, user_agent)

Command line usage

you can use idm or pyidm

usage: idm/pyidm [-h] [-p PATH] [-o OUTPUT] [-c] [-r REFERRER] [-C COOKIE] [-D POST_DATA] [-U USERNAME] [-P PASSWORD]
              [-ua USER_AGENT] [--config CONFIG]
              [URLS ...]

Command line downloader with/Via Internet Download Manager(IDM), type 'c' for get url from clipboard

positional arguments:
  URLS                  url to download, or "c" to get url from clipboard

options:
  -h, --help            show this help message and exit
  -p PATH, --path PATH  Path to save
  -o OUTPUT, --output OUTPUT
                        Save with different name
  -c, --confirm         Confirm before download
  -r REFERRER, --referrer REFERRER
                        Url referrer
  -C COOKIE, --cookie COOKIE
                        Cookie string or dict
  -D POST_DATA, --post-data POST_DATA
                        Post Data string or dict
  -U USERNAME, --username USERNAME
                        Username if require
  -P PASSWORD, --password PASSWORD
                        Password if require
  -ua USER_AGENT, --user-agent USER_AGENT
                        Send with custom User-Agent string
  --config CONFIG       set config, format section:option:value, for list valid section/option type "doc"

Support

  • Python 2.7+, Python 3.x
  • Windows (only), for Linux you can't use pywget (pip install pywget)

Tips

always provide ‘referrer’, some sites must have referrer in header

Links

Author

Hadi Cahyadi

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

idm-0.49.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

idm-0.49-py2.py3-none-any.whl (9.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file idm-0.49.tar.gz.

File metadata

  • Download URL: idm-0.49.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for idm-0.49.tar.gz
Algorithm Hash digest
SHA256 ecdb64d2bc5af565302ec0200beda784c7129eb311bf9be628da0b5b0c7992e1
MD5 66a3d87acba147640b1d41a4d1213609
BLAKE2b-256 a71b397e50d21fd84289f2542d03d70519ad325c5810af4ec51abe7d19e913c1

See more details on using hashes here.

File details

Details for the file idm-0.49-py2.py3-none-any.whl.

File metadata

  • Download URL: idm-0.49-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for idm-0.49-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f0ead5197fc150d42dbc5820ebb143b5f705a3328d9b6a5b797353379de4ddea
MD5 f6586d098f4df8eb439abbc40cc55bf9
BLAKE2b-256 b7639eb7f14bbe095b4e4bc6ee921fac5938f2ab7d847ad47cbf690526df7a02

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page