Skip to main content
 首页 » 编程设计

python之你如何在 libtorrent 中获得 torrent 的总大小

2024年11月01日9开发

如何获取 torrent 文件的总大小?

有什么方法可以获取 torrent 中的文件数量和每个文件的大小?

请您参考如下方法:

h = ses.add_torrent(params) 
s = h.status() 
while (not h.is_seed()): 
    print s.total_wanted   # prints total size wanted after meta data is obtained, before that 0 is printed.