我试图使用以下python3代码使用xmlrpc将一个torrent文件加载到rtorrent中:
import xmlrpc.client
server_url = "https://%s:%s@%s/xmlrpc" % ('[REDACTED]', '[REDACTED]', '[REDACTED]');
server = xmlrpc.client.Server(server_url);
with open("test.torrent", "rb") as torrent:
server.load.raw_verbose(xmlrpc.client.Binary(torrent.read()),"d.delete_tied=","d.custom1.set=Test","d.directory.set=/home/[REDACTED]/files")load_raw命令返回时没有出现错误(返回代码0),但是torrent中没有显示该数据流。我似乎经历了与这 reddit post相同的事情,但我使用Binary类时没有任何运气。
我用的是一个Whatbox播种机。
编辑:
启用日志后,我将看到
1572765194 E Could not create download, the input is not a valid torrent.但是,当尝试加载torrent文件时,通过rutorrent UI手动加载该torrent文件很好。
发布于 2019-11-03 11:28:09
我需要添加""作为第一个参数:
server.load.raw_verbose("",xmlrpc.client.Binary(torrent.read()),"d.delete_tied=","d.custom1.set=Test","d.directory.set=/home/[REDACTED]/files")不知道为什么,文档似乎没有显示出这是必要的。
https://stackoverflow.com/questions/58678091
复制相似问题