bash 为什么不能用aria2c命令下载磁铁?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38319189/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Why can't download the magnet with aria2c command?
提问by coder_view
The Battlestar Galactica
here
http://kickasstorrentsan.com/usearch/Battlestar%20Galactica/
can be downloaded with deluge.
在Battlestar Galactica
这里
http://kickasstorrentsan.com/usearch/Battlestar%20Galactica/
可以用泛滥来下载。
Now i scrap the magnet with firebug on the web page.
It can be verified that the magnet is :
可以验证磁铁是:
magnet:?xt=urn:btih:2D2CAE6AC83800490327547053597BAFF6701C2F&dn=battlestar+galactica+season+1+s01+1080p+bluray+x265+hevc+aac+5+1+joy+utr&tr=udp%3A%2F%2Ftracker.publicbt.com%2Fannounce&tr=udp%3A%2F%2Fglotorrents.pw%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce
The bash script were written as following:
1.the $url variable is right address for magnet.
2.aria2c command can be executed correctly.
3.aria2c $url
has beeen executed for about one hour.Why nothing can be dowlonaded?
1. $url 变量是磁铁的正确地址。
2.aria2c 命令可以正确执行。
3.aria2c $url
已经执行了大约一个小时了,为什么什么都打不开?
回答by Inian
This page
says, you need to enable DHT option while downloading using magnet-links:-
这page
表示,您需要在使用磁力链接下载时启用 DHT 选项:-
This official documentation
page says, it is enabled by default from version 1.25.0
这个official documentation
页面说,它从版本默认启用1.25.0
--enable-dht[=true|false] Enable IPv4 DHT functionality. It also enables UDP tracker support. If a private flag is set in a torrent, aria2 doesn't use DHT for that download even if true is given. Default: true
--enable-dht[=true|false] 启用 IPv4 DHT 功能。它还启用 UDP 跟踪器支持。如果在 torrent 中设置了私有标志,即使给出了 true,aria2 也不会为该下载使用 DHT。默认值:真
Checked the release notes from GitHub
, couldn't find the exact release since the flag --enable-dht
has been made to true
.
从 中查看发行说明GitHub
,找不到确切的发行版,因为标志--enable-dht
已更改为true
。
Upgrade to the latest version to have the flag enabled by default (or) enable it explicitly if you are using an older version.
升级到最新版本以默认启用该标志(或)如果您使用的是旧版本,则明确启用它。
aria2c --enable-dht=true "magnet:?xt=urn:btih:2D2CAE6AC83800490327547053597BAFF6701C2F&dn=battlestar+galactica+season+1+s01+1080p+bluray+x265+hevc+aac+5+1+joy+utr&tr=udp%3A%2F%2Ftracker.publicbt.com%2Fannounce&tr=udp%3A%2F%2Fglotorrents.pw%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce"