Libtorrent,Python,如何设置下载速度
有没有办法通过Python来改变libtorrent库中下载的速度呢?
1 个回答
1
你不能直接“设置”下载速度,但你可以限制它。这可以通过使用
torrent_handle::set_download_limit(int limit)
在Python中:
h = ses.add_torrent(info, "tmp")
h.set_download_limit(2048)
这段代码会把你的下载速度限制在每秒2千字节。