pythonlibtorrent torrent\u信息方法

2024-05-23 21:52:55 发布

您现在位置:Python中文网/ 问答频道 /正文

我一直在使用python-libtorrent检查在包含多个文件的torrent中哪些片段属于一个文件

我正在使用下面的代码对torrent文件进行迭代

info = libtorrent.torrent_info('~/.torrent')
for f in info.files():
    print f

但是它返回<libtorrent.file_entry object at 0x7f0eda4fdcf0>,我不知道如何从中提取信息

我不知道torrent_info属性会返回各种文件的片段值信息。谢谢你的帮助


Tags: 文件代码ininfo信息for属性object