peterding / aget Goto Github PK
View Code? Open in Web Editor NEWAget - An Asynchronous Downloader
Aget - An Asynchronous Downloader
作者您好,我在使用软件的过程中遇到了一些问题
1.我看到帮助文档里面有关于-t(timeout)参数的使用说明,于是我加上了-t1参数,结果程序就没有下载了,程序内部给出的错误是
ERROR:root:[<function Connection.connect at 0x7fb9ac4fa488>]: CancelledError()
2.今天我和朋友弄了一个破解百度云的网站,188.166.240.234,使用的是您的程序,但是请问为什么两个人同时下载的时候会导致无法下载(即aget仍在运行,但是下载速度为0)
3.我的下载vps是2Gbps的网络,结果现在使用的-s 650k -k 130k(目前试过最好的速度了)也只有100mbps/s,和宽带原有的速度差多了,请问您觉得要用什么参数才会更好呢?
期待您的回复。
redapple@arch ~> aget "http://d.pcs.baidu.com/file/1ecadcc97fbd62b50f6222ae1f478c17?fid=3828976137-250528-206201922957384&time=1487474557&rt=pr&sign=FDTAERVCY-DCb740ccc5511e5e8fedcff06b081203-tlHrmnLhsxx4xtYz7vuMfofILIk%3D&expires=8h&chkv=1&chkbd=1&chkpc=et&dp-logid=1147442723880594596&dp-callid=0&r=834131648" -s 1000 -k 200k
File: 1ecadcc97fbd62b50f6222ae1f478c17
Size: 5.8G (6246432768)
0.0B/5.8G 0.00% 0.0B/s [ ]
ERROR:asyncio:Exception in callback save_data(<aget.models....x7f41b58827b8>, 26009727, 26214527, <aget.models....x7f41bb239da0>, 128)(<Task finishe...\x00\x00\x00'>) at /usr/lib/python3.6/site-packages/aget/download.py:99
handle: <Handle save_data(<aget.models....x7f41b58827b8>, 26009727, 26214527, <aget.models....x7f41bb239da0>, 128)(<Task finishe...\x00\x00\x00'>) at /usr/lib/python3.6/site-packages/aget/download.py:99>
Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/events.py", line 126, in _run
File "/usr/lib/python3.6/site-packages/aget/download.py", line 103, in save_data
File "/usr/lib/python3.6/site-packages/aget/models.py", line 62, in record_data
File "/usr/lib/python3.6/site-packages/aget/models.py", line 121, in write
OSError: [Errno 24] Too many open files: '1ecadcc97fbd62b50f6222ae1f478c17.aget'
ERROR:asyncio:Exception in callback save_data(<aget.models....x7f41b58827b8>, 194560950, 194765750, <aget.models....x7f41bb239da0>, 951)(<Task finishe...\xd7\x00\x12'>) at /usr/lib/python3.6/site-packages/aget/download.py:99
handle: <Handle save_data(<aget.models....x7f41b58827b8>, 194560950, 194765750, <aget.models....x7f41bb239da0>, 951)(<Task finishe...\xd7\x00\x12'>) at /usr/lib/python3.6/site-packages/aget/download.py:99>
Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/events.py", line 126, in _run
File "/usr/lib/python3.6/site-packages/aget/download.py", line 103, in save_data
File "/usr/lib/python3.6/site-packages/aget/models.py", line 62, in record_data
File "/usr/lib/python3.6/site-packages/aget/models.py", line 121, in write
OSError: [Errno 24] Too many open files: '1ecadcc97fbd62b50f6222ae1f478c17.aget'
ERROR:asyncio:Exception in callback save_data(<aget.models....x7f41b58827b8>, 63488310, 63693110, <aget.models....x7f41bb239da0>, 311)(<Task finishe...xdbM\x85\xf6'>) at /usr/lib/python3.6/site-packages/aget/download.py:99
handle: <Handle save_data(<aget.models....x7f41b58827b8>, 63488310, 63693110, <aget.models....x7f41bb239da0>, 311)(<Task finishe...xdbM\x85\xf6'>) at /usr/lib/python3.6/site-packages/aget/download.py:99>
Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/events.py", line 126, in _run
File "/usr/lib/python3.6/site-packages/aget/download.py", line 103, in save_data
File "/usr/lib/python3.6/site-packages/aget/models.py", line 62, in record_data
File "/usr/lib/python3.6/site-packages/aget/models.py", line 121, in write
OSError: [Errno 24] Too many open files: '1ecadcc97fbd62b50f6222ae1f478c17.aget'
ERROR:asyncio:Exception in callback save_data(<aget.models....x7f41b58827b8>, 59597091, 59801891, <aget.models....x7f41bb239da0>, 292)(<Task finishe...00p\x00t\x00'>) at /usr/lib/python3.6/site-packages/aget/download.py:99
handle: <Handle save_data(<aget.models....x7f41b58827b8>, 59597091, 59801891, <aget.models....x7f41bb239da0>, 292)(<Task finishe...00p\x00t\x00'>) at /usr/lib/python3.6/site-packages/aget/download.py:99>
Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/events.py", line 126, in _run
File "/usr/lib/python3.6/site-packages/aget/download.py", line 103, in save_data
File "/usr/lib/python3.6/site-packages/aget/models.py", line 62, in record_data
File "/usr/lib/python3.6/site-packages/aget/models.py", line 121, in write
OSError: [Errno 24] Too many open files: '1ecadcc97fbd62b50f6222ae1f478c17.aget'
ERROR:asyncio:Exception in callback save_data(<aget.models....x7f41b58827b8>, 179200875, 179405675, <aget.models....x7f41bb239da0>, 876)(<Task finishe...\x89\x0b\x00'>) at /usr/lib/python3.6/site-packages/aget/download.py:99
handle: <Handle save_data(<aget.models....x7f41b58827b8>, 179200875, 179405675, <aget.models....x7f41bb239da0>, 876)(<Task finishe...\x89\x0b\x00'>) at /usr/lib/python3.6/site-packages/aget/download.py:99>
Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/events.py", line 126, in _run
File "/usr/lib/python3.6/site-packages/aget/download.py", line 103, in save_data
File "/usr/lib/python3.6/site-packages/aget/models.py", line 62, in record_data
File "/usr/lib/python3.6/site-packages/aget/models.py", line 121, in write
OSError: [Errno 24] Too many open files: '1ecadcc97fbd62b50f6222ae1f478c17.aget'
ERROR:asyncio:Exception in callback save_data(<aget.models....x7f41b58827b8>, 202752990, 202957790, <aget.models....x7f41bb239da0>, 991)(<Task finishe...\xb0\xae\x80'>) at /usr/lib/python3.6/site-packages/aget/download.py:99
handle: <Handle save_data(<aget.models....x7f41b58827b8>, 202752990, 202957790, <aget.models....x7f41bb239da0>, 991)(<Task finishe...\xb0\xae\x80'>) at /usr/lib/python3.6/site-packages/aget/download.py:99>
Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/events.py", line 126, in _run
File "/usr/lib/python3.6/site-packages/aget/download.py", line 103, in save_data
File "/usr/lib/python3.6/site-packages/aget/models.py", line 62, in record_data
File "/usr/lib/python3.6/site-packages/aget/models.py", line 121, in write
OSError: [Errno 24] Too many open files: '1ecadcc97fbd62b50f6222ae1f478c17.aget'
ERROR:asyncio:Exception in callback save_data(<aget.models....x7f41b58827b8>, 59801892, 60006692, <aget.models....x7f41bb239da0>, 293)(<Task finishe...raft file er'>) at /usr/lib/python3.6/site-packages/aget/download.py:99
handle: <Handle save_data(<aget.models....x7f41b58827b8>, 59801892, 60006692, <aget.models....x7f41bb239da0>, 293)(<Task finishe...raft file er'>) at /usr/lib/python3.6/site-packages/aget/download.py:99>
Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/events.py", line 126, in _run
File "/usr/lib/python3.6/site-packages/aget/download.py", line 103, in save_data
File "/usr/lib/python3.6/site-packages/aget/models.py", line 62, in record_data
File "/usr/lib/python3.6/site-packages/aget/models.py", line 121, in write
OSError: [Errno 24] Too many open files: '1ecadcc97fbd62b50f6222ae1f478c17.aget'
ERROR:asyncio:Exception in callback save_data(<aget.models....x7f41b58827b8>, 159539979, 159744779, <aget.models....x7f41bb239da0>, 780)(<Task finishe...\x99\x1b\x00'>) at /usr/lib/python3.6/site-packages/aget/download.py:99
handle: <Handle save_data(<aget.models....x7f41b58827b8>, 159539979, 159744779, <aget.models....x7f41bb239da0>, 780)(<Task finishe...\x99\x1b\x00'>) at /usr/lib/python3.6/site-packages/aget/download.py:99>
Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/events.py", line 126, in _run
File "/usr/lib/python3.6/site-packages/aget/download.py", line 103, in save_data
File "/usr/lib/python3.6/site-packages/aget/models.py", line 62, in record_data
File "/usr/lib/python3.6/site-packages/aget/models.py", line 121, in write
OSError: [Errno 24] Too many open files: '1ecadcc97fbd62b50f6222ae1f478c17.aget'
aget有没有考虑添加这些功能?
表示现在开一个虚拟机来下载好蛋疼....作者有没有支持windows的想法?
如果能增加torrent下载就好了。谢谢
我在 python 中 import 并调用 aget 来下载文件,如果是下载大文件的话,在下载过程中程序会一直阻塞,直到下载完成或失败。
想问一下如何才能实现不阻塞,并且能随时获取下载信息,例如:
from time import sleep
from aget import aget
task = aget(url="http://******", chunk_size="2m")
task.start_download()
sleep(5)
print(task.process) # 0.12
print(task.speed) # 3145728
# 还有其他属性例如已下载大小、总大小、本次下载大小、之前中断时已下载大小
# 间隔输出下载信息
while not task.done():
print(f"进度 {int(task.process) * 100}% 大小{task.downloaded_size / 1024 / 1024} MB / {task.total_size / 1024 / 1024} MB")
sleep(1)
# 或者手动阻塞直到下载结束
task.join()
下载某些文件的时候还是有必要使用代理的。
现在aget
的代码是调用mugen.request
来通信的,而mugen.request
已经实现了对使用代理的支持,所以只要把proxy参数传入到mugen.request
的调用就应该可以自然地为aget
添加代理支持。建议加入该功能。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.