anacrolix / torrent

Full-featured BitTorrent client package and utilities
Mozilla Public License 2.0
5.51k stars 622 forks source link

Torrents from https://archive.org omit schemes and hostnames #783

Open Shawn-Huang-Tron opened 1 year ago

Shawn-Huang-Tron commented 1 year ago

I have got some torrent's file from here:https://archive.org/ But sounds like that all of these torrent can't be downloaded.

There are some logs below:

2022-11-06T19:09:57+0800 NIL [torrent 55e5f8c36e7cb3208b164f31d3e0b28b0e687d04 github.com/anacrolix/torrent.(*webseedPeer).requestResultHandler:169]: "alice_in_wonderland_librivox": webseed peer for "/8/items/": Request {0 {49152 16384}} rejected: reading "/8/items/alice_in_wonderland_librivox/AliceInWonderland_librivox.m4b" at "bytes=49152-65535": Get "/8/items/alice_in_wonderland_librivox/AliceInWonderland_librivox.m4b": unsupported protocol scheme ""
2022-11-06T19:09:57+0800 NIL [github.com/anacrolix/torrent.(*webseedPeer).requestResultHandler:174]: closing webseed peer for "/8/items/"
2022-11-06T19:09:57+0800 NIL [github.com/anacrolix/torrent.(*webseedPeer).requester.func1:97]: requester 3: error doing webseed request {0 {49152 16384}}: reading "/8/items/alice_in_wonderland_librivox/AliceInWonderland_librivox.m4b" at "bytes=49152-65535": Get "/8/items/alice_in_wonderland_librivox/AliceInWonderland_librivox.m4b": unsupported protocol scheme ""

It shows 'unsupported protocol scheme ""'. I see your internal examples had this case,and this library support webseed. But why all my case from here(https://archive.org/) is failed? BTW, magnet or torrent file from other origins works well.Thanks.

anacrolix commented 1 year ago

It looks like the torrents there omit host names and schemes. This probably requires a small fix to infer them from context.