Skip to main content

通过cdn 下载文件

Project description

CDN 下载器

一键下载文件by cdn

cdn-dl

help:

cdn-dl -h
usage: cdn-dl [-h] -u URL -o OUT [-ua USE_AGENT] [-ts TRUNK_SIZE] [-t TIMEOUT] [-r RETRY] [-d] cdn [cdn ...]

cdn-dl 下载配置

positional arguments:
  cdn                   cdn configs配置,支持ip| ip:port |ip:port:host 字串或文本或host文件

optional arguments:
  -h, --help            show this help message and exit
  -u URL, --url URL     文件下载url
  -o OUT, --out OUT     文件下载路径
  -ua USE_AGENT, --use_agent USE_AGENT
                        是否使用user agent
  -ts TRUNK_SIZE, --trunk_size TRUNK_SIZE
                        下载使用的trunk size, 默认8192
  -t TIMEOUT, --timeout TIMEOUT
                        下载请求超时时间, 默认10s
  -r RETRY, --retry RETRY
                        下载请求重试次数, 默认3
  -d, --debug           是否打印调试信息

eg:

cdn-dl -u https://download.docker.com/linux/static/stable/x86_64/docker-27.2.1.tgz -o test.tgz docker.hosts

cdn-get

help:

cdn-get -h
usage: cdn-get [-h] -o OUT [-T THREAD] [-t TIMEOUT] [-r RETRY] [--api API] domain [domain ...]

cdn-get 配置

positional arguments:
  domain                需要获取cdn的域名或者文本

optional arguments:
  -h, --help            show this help message and exit
  -o OUT, --out OUT     输出hosts 文件路径
  -T THREAD, --thread THREAD
                        多线程数量
  -t TIMEOUT, --timeout TIMEOUT
                        下载请求超时时间, 默认10s
  -r RETRY, --retry RETRY
                        下载请求重试次数, 默认3
  --api API             dns api, 默认ali

eg:

cdn-get download.docker.com -o docker.hosts

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

cdn_dl-1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file cdn_dl-1.0-py3-none-any.whl.

File metadata

  • Download URL: cdn_dl-1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.10

File hashes

Hashes for cdn_dl-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 008d51cb399ea5f8a91193c976cdd2e05bd1c3529274018209872c2c7a711d67
MD5 96c8c1fc3ed58873f2b06bb8dd57922d
BLAKE2b-256 713faa2476ba077c3da169f754881e8a13fa08b1419b37875c00fd64f174bb4f

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