Skip to main content

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

add link without start downloading

from idm import IDMan

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

downloader.download(url, r"c:\DOWNLOADS", "test_output.exe", add_only=True)

or run on terminal/cmd

> idm "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;"
# or pyidm

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)

positional arguments:
  URLS                  url to download, or "c" to get url from clipboard or a text file containing one link per line

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
  -a, --add             Add link to IDM without start downloading
  -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 use pywget (pip install pywget)

Tips

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

Author

Hadi Cahyadi

Buy Me a Coffee

Donate via Ko-fi

Support me on Patreon

Metadata

Release files for idm 0.57.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for idm 0.57.2
File Size Uploaded
idm-0.57.2.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for idm 0.57.2
File Interpreter ABI Platform
idm-0.57.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 20.3 kB

Release files / idm-0.57.2.tar.gz

Download URL idm-0.57.2.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
66f7ef060185d816cbe19c25d10bdf6e05aac5d6511946ee0377dafc76345595
BLAKE2b-256 checksum
How to use checksums
7b79ff4ed26d9f8095c1c64fc9111fb70d5416dc65a969d15c92a85ca80d5bd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / idm-0.57.2-py2.py3-none-any.whl

Download URL idm-0.57.2-py2.py3-none-any.whl
Size 11.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
9521caf446eb0c8c76795f01bc8b5ec1a931e57421e6cbdd079da34f75eade1c
BLAKE2b-256 checksum
How to use checksums
7516f230cdb4d84cdfb5ca02c9fb0541614938f15407aabf76527a6443e25fb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.57.2 This release

2 release files

0.57

2 release files

0.56

2 release files

0.55

2 release files

0.54

2 release files

0.53

2 release files

0.49

2 release files

0.47

2 release files

0.39

2 release files

0.38

2 release files

0.37

2 release files

0.36

2 release files

0.34

1 release file

0.33

1 release file

0.32

1 release file

0.26

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page