Download aria2c可以下载URL列表,每个URL都有特定的文件名吗?
例如,我有一个URL列表:Download aria2c可以下载URL列表,每个URL都有特定的文件名吗?,download,aria2,Download,Aria2,例如,我有一个URL列表: https://link.com/file/get/somefile.ext https://go.com/download/anotherfile.ext https://program.com/selection/download.php?id=26162 我想为最后一个URL设置一个特定的名称,如下所示: https://program.com/selection/download.php?id=26162 -o thirdfile.ext aria2c h
https://link.com/file/get/somefile.ext
https://go.com/download/anotherfile.ext
https://program.com/selection/download.php?id=26162
我想为最后一个URL设置一个特定的名称,如下所示:
https://program.com/selection/download.php?id=26162 -o thirdfile.ext
aria2c https://link.com/file/get/somefile.ext
aria2c https://go.com/download/anotherfile.ext
aria2c https://program.com/selection/download.php?id=26162 -o thirdfile.ext
是否可以使用aria2c下载列表语法
我知道我可以这样做:
https://program.com/selection/download.php?id=26162 -o thirdfile.ext
aria2c https://link.com/file/get/somefile.ext
aria2c https://go.com/download/anotherfile.ext
aria2c https://program.com/selection/download.php?id=26162 -o thirdfile.ext
但这样我跑了太多aria2c的 来自上的文档 此外,可以在每个URI行之后指定选项。选项行必须以一个或多个空格字符(
空格
或选项卡
)开头,并且每行只能包含一个选项…有关详细信息,请参见小节
如果你问我,那并不完全清楚。下面是一个输入文件的示例(只有一个条目):
例如:
制作一个文本文件,list.txt,其中包含以下链接:
https://www.google.hu/search?q=a&start=0
https://www.google.hu/search?q=a&start=10
https://www.google.hu/search?q=a&start=20
命令:
aria2c -ilist.txt -j2
其中-j选项指定并行下载的数量
结果:
D:\aria2c>aria2c -ihtml.txt
12/22 07:49:57 [NOTICE] Downloading 3 item(s)
12/22 07:49:57 [WARN] aria2c had to connect to the other side using an unknown TLS protocol. The integrity and confidentiality of the connection might be compromised.
Peer: www.google.hu (2a00:1450:400d:805::2003:443)
12/22 07:49:57 [WARN] aria2c had to connect to the other side using an unknown TLS protocol. The integrity and confidentiality of the connection might be compromised.
Peer: www.google.hu (2a00:1450:400d:805::2003:443)
12/22 07:49:57 [WARN] aria2c had to connect to the other side using an unknown TLS protocol. The integrity and confidentiality of the connection might be compromised.
Peer: www.google.hu (2a00:1450:400d:805::2003:443)
12/22 07:49:57 [NOTICE] File already exists. Renamed to /cygdrive/d/aria2c/search.1.
12/22 07:49:57 [NOTICE] File already exists. Renamed to /cygdrive/d/aria2c/search.2.
12/22 07:49:58 [NOTICE] Download complete: /cygdrive/d/aria2c/search.2
12/22 07:49:58 [NOTICE] Download complete: /cygdrive/d/aria2c/search.1
[#c86c02 0B/0B CN:1 DL:77KiB]
12/22 07:49:58 [NOTICE] Download complete: /cygdrive/d/aria2c/search
Download Results:
gid |stat|avg speed |path/URI
======+====+===========+=======================================================
efcadb|OK | 46KiB/s|/cygdrive/d/aria2c/search.2
554614|OK | 44KiB/s|/cygdrive/d/aria2c/search.1
c86c02|OK | 60KiB/s|/cygdrive/d/aria2c/search
Status Legend:
(OK):download completed.
D:\aria2c>aria2c --input-file list.txt
12/22 20:54:44 [NOTICE] Downloading 3 item(s)
12/22 20:54:45 [WARN] aria2c had to connect to the other side using an unknown TLS protocol. The integrity and confidentiality of the connection might be compromised.
Peer: www.google.hu (2a00:1450:400d:805::2003:443)
12/22 20:54:45 [WARN] aria2c had to connect to the other side using an unknown TLS protocol. The integrity and confidentiality of the connection might be compromised.
Peer: www.google.hu (2a00:1450:400d:805::2003:443)
12/22 20:54:45 [WARN] aria2c had to connect to the other side using an unknown TLS protocol. The integrity and confidentiality of the connection might be compromised.
Peer: www.google.hu (2a00:1450:400d:805::2003:443)
[DL:37KiB][#177d35 0B/0B][#bae5ee 0B/0B][#d1da5b 0B/0B]
12/22 20:54:46 [NOTICE] Download complete: /cygdrive/d/aria2c/s1.html
[DL:53KiB][#bae5ee 0B/0B][#d1da5b 0B/0B]
12/22 20:54:47 [NOTICE] Download complete: /cygdrive/d/aria2c/s2.html
12/22 20:54:47 [NOTICE] Download complete: /cygdrive/d/aria2c/s3.html
Download Results:
gid |stat|avg speed |path/URI
======+====+===========+=======================================================
177d35|OK | 53KiB/s|/cygdrive/d/aria2c/s1.html
bae5ee|OK | 18KiB/s|/cygdrive/d/aria2c/s2.html
d1da5b|OK | 15KiB/s|/cygdrive/d/aria2c/s3.html
Status Legend:
(OK):download completed.
在结果中,search将是start=0文件,te search.2将依次是start=20文件。因此,您可以使用另一个脚本按顺序重命名它们
解决方案:
制作一个包含链接的文本文件,list.txt,在每个链接后,从制表符或空格开始选择:
https://www.google.hu/search?q=a&start=0
out=s1.html
https://www.google.hu/search?q=a&start=10
out=s2.html
https://www.google.hu/search?q=a&start=20
out=s3.html
命令:
aria2c --input-file list.txt
结果:
D:\aria2c>aria2c -ihtml.txt
12/22 07:49:57 [NOTICE] Downloading 3 item(s)
12/22 07:49:57 [WARN] aria2c had to connect to the other side using an unknown TLS protocol. The integrity and confidentiality of the connection might be compromised.
Peer: www.google.hu (2a00:1450:400d:805::2003:443)
12/22 07:49:57 [WARN] aria2c had to connect to the other side using an unknown TLS protocol. The integrity and confidentiality of the connection might be compromised.
Peer: www.google.hu (2a00:1450:400d:805::2003:443)
12/22 07:49:57 [WARN] aria2c had to connect to the other side using an unknown TLS protocol. The integrity and confidentiality of the connection might be compromised.
Peer: www.google.hu (2a00:1450:400d:805::2003:443)
12/22 07:49:57 [NOTICE] File already exists. Renamed to /cygdrive/d/aria2c/search.1.
12/22 07:49:57 [NOTICE] File already exists. Renamed to /cygdrive/d/aria2c/search.2.
12/22 07:49:58 [NOTICE] Download complete: /cygdrive/d/aria2c/search.2
12/22 07:49:58 [NOTICE] Download complete: /cygdrive/d/aria2c/search.1
[#c86c02 0B/0B CN:1 DL:77KiB]
12/22 07:49:58 [NOTICE] Download complete: /cygdrive/d/aria2c/search
Download Results:
gid |stat|avg speed |path/URI
======+====+===========+=======================================================
efcadb|OK | 46KiB/s|/cygdrive/d/aria2c/search.2
554614|OK | 44KiB/s|/cygdrive/d/aria2c/search.1
c86c02|OK | 60KiB/s|/cygdrive/d/aria2c/search
Status Legend:
(OK):download completed.
D:\aria2c>aria2c --input-file list.txt
12/22 20:54:44 [NOTICE] Downloading 3 item(s)
12/22 20:54:45 [WARN] aria2c had to connect to the other side using an unknown TLS protocol. The integrity and confidentiality of the connection might be compromised.
Peer: www.google.hu (2a00:1450:400d:805::2003:443)
12/22 20:54:45 [WARN] aria2c had to connect to the other side using an unknown TLS protocol. The integrity and confidentiality of the connection might be compromised.
Peer: www.google.hu (2a00:1450:400d:805::2003:443)
12/22 20:54:45 [WARN] aria2c had to connect to the other side using an unknown TLS protocol. The integrity and confidentiality of the connection might be compromised.
Peer: www.google.hu (2a00:1450:400d:805::2003:443)
[DL:37KiB][#177d35 0B/0B][#bae5ee 0B/0B][#d1da5b 0B/0B]
12/22 20:54:46 [NOTICE] Download complete: /cygdrive/d/aria2c/s1.html
[DL:53KiB][#bae5ee 0B/0B][#d1da5b 0B/0B]
12/22 20:54:47 [NOTICE] Download complete: /cygdrive/d/aria2c/s2.html
12/22 20:54:47 [NOTICE] Download complete: /cygdrive/d/aria2c/s3.html
Download Results:
gid |stat|avg speed |path/URI
======+====+===========+=======================================================
177d35|OK | 53KiB/s|/cygdrive/d/aria2c/s1.html
bae5ee|OK | 18KiB/s|/cygdrive/d/aria2c/s2.html
d1da5b|OK | 15KiB/s|/cygdrive/d/aria2c/s3.html
Status Legend:
(OK):download completed.
问题是关于为每个url指定不同的文件名,并回答这个问题,而您的url不是。您有权这么做,谢谢您的观察。编辑。