根据libtorrent doc的代码,我尝试从 torrent 文件中获取磁力链接:
info = lt.torrent_info(t) # t is a torrent file
return(lt.make_magnet_uri(info))
它返回一个链接:
magnet:?xt=urn:btih:YC5BHBHYDFYZOJRMD5BYGA2QRRXVRGAM&dn=BTshare.ogv
但是这个链接不起作用。(注意torrent文件没有问题)。
因此,我尝试通过传输检索此洪流的磁力链接。事实证明,结果是不同的:
magnet:?xt=urn:btih:c0ba1384f8197197262c1f438303508c6f58980c&dn=BTshare.ogv
所以我认为我使用 python-libtorrent 获取磁力链接的方式存在问题。有没有人有一个工作的例子?
问候。