Python Libtorrent:在链接uri中添加多个跟踪器

Python Libtorrent:在链接uri中添加多个跟踪器,python,torrent,libtorrent,magnet-uri,libtorrent-rasterbar,Python,Torrent,Libtorrent,Magnet Uri,Libtorrent Rasterbar,我正在尝试在libtorrent中使用多跟踪器。我在leechers中直接使用magnet_链接而不是torrent文件。 播种时,我可以在add_tracker()中添加多个跟踪器。但当我生成磁铁链接时,如: magnet_link = "magnet:?xt=urn:btih:"+b32hash+"&tr="+tracker 我不确定,如何在tr=“+tracker 用于生成磁铁连杆的播种机侧代码: torrent = open(tfile_path, 'r').read() m

我正在尝试在libtorrent中使用多跟踪器。我在leechers中直接使用magnet_链接而不是torrent文件。 播种时,我可以在add_tracker()中添加多个跟踪器。但当我生成磁铁链接时,如:

 magnet_link = "magnet:?xt=urn:btih:"+b32hash+"&tr="+tracker
我不确定,如何在
tr=“+tracker

用于生成磁铁连杆的播种机侧代码:

torrent = open(tfile_path, 'r').read()
metadata = lt.bdecode(torrent)
hashcontents = lt.bencode(metadata['info'])
digest = hashlib.sha1(hashcontents).digest()
b32hash = base64.b32encode(digest)
magnet_link = "magnet:?xt=urn:btih:"+b32hash+"&tr="+tracker
Leecher侧代码使用磁铁链接:

params = {'save_path': temp_path}
h = lt.add_magnet_uri(ses, magnet_link, params)

只需重复
tr
参数即可添加多个跟踪器,如下所示:

magnet_link = "magnet:?xt=urn:btih:"+b32hash+"&tr="+tracker1+"&tr="+tracker2+"&tr="+tracker3...