AIODL——又一个命令行下载加速器。
aiodl的Python项目详细描述
功能
- 使用多个连接加速下载过程 一个文件。
- 对网络错误进行合理的重试。
- 断点恢复。
安装
$ pip3 install aiodl --user
# or
$ sudo pip3 install aiodl
用法
命令行
只需使用url:
调用aiodl。$ aiodl https://dl.google.com/translate/android/Translate.apk File: Translate.apk Size: 16.8M Type: application/vnd.android.package-archive 11%|████▎ | 1.78M/16.0M [00:03<00:26, 565KB/s]
按ctrl+c停止下载。AIODL将保存必要的信息 到<download-file>.aiodl,下次它将自动继续 从这里下载。
其他参数:
--fake-user-agent, -u Use a fake User-Agent. --num-tasks N, -n N Limit number of asynchronous tasks. --max-tries N, -r N Limit retries on network errors.
在你的脚本中
importaiodl# in an async functionfilename=awaitaiodl.download('https://dl.google.com/translate/android/Translate.apk',quiet=True)