【问题标题】:Loading a magnet torrent with Python and Libtorrent使用 Python 和 Libtorrent 加载磁力种子
【发布时间】:2018-10-22 19:54:44
【问题描述】:

我正在尝试下载带有磁力链接的种子。磁铁链接就像我在几个客户端上尝试过的那样有效,但是这段代码卡在“0% done”上,并且在没有下载的情况下循环。有谁知道为什么?

import libtorrent as lt
import time

ses = lt.session()
params = { 'save_path': '/downloads/'}
link = "magnet:?xt=urn:btih:bee75372b98077bfd4de8ef03eb33e9289be5cd8&dn=Avengers+Infinity+War+2018+NEW+PROPER+720p+HD-CAM+X264+HQ-CPG&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Fzer0day.ch%3A1337&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Fexodus.desync.com%3A6969"
handle = lt.add_magnet_uri(ses, link, params)

print 'downloading metadata...'
while (not handle.has_metadata()): time.sleep(1)
print 'got metadata, starting torrent download...'
while (handle.status().state != lt.torrent_status.seeding):
    print '%d %% done' % (handle.status().progress*100)
    time.sleep(1)

【问题讨论】:

    标签: python libtorrent magnet-uri


    【解决方案1】:

    种子下载失败的原因有很多。

    几个例子:

    • 群体中没有种子
    • 需求远大于供给,而您还没有摆脱困境
    • 您的磁盘已满或存在其他一些权限问题

    您可以在 libtorrent.org 上找到 troubleshooting chart,其中涵盖了一些常见症状和有关要查看哪些指标的提示。

    它是从一个简单的 dot file 创建的,所以如果您的问题没有得到解决,请随时提交改进的拉取请求。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-01-21
      • 1970-01-01
      • 2015-01-21
      • 2020-01-13
      • 1970-01-01
      相关资源
      最近更新 更多