无法使用原始base64表单和python xmlrpc客户端加载torrent文件
我正在尝试使用带有以下python3代码的xmlrpc将torrent文件加载到rtorrent中:无法使用原始base64表单和python xmlrpc客户端加载torrent文件,python,python-3.x,torrent,Python,Python 3.x,Torrent,我正在尝试使用带有以下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:
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不会出现在rutorrent UI中。我似乎经历了与reddit post相同的事情,但我使用的是Binary
类,没有任何运气
我用的是种子箱
编辑:
启用日志记录后,我看到
1572765194 E Could not create download, the input is not a valid torrent.
尝试加载torrent文件时,通过rutorrent UI手动加载torrent文件效果良好。我需要添加“
作为第一个参数:
server.load.raw_verbose("",xmlrpc.client.Binary(torrent.read()),"d.delete_tied=","d.custom1.set=Test","d.directory.set=/home/[REDACTED]/files")
不知道为什么,但事实似乎并没有表明这是必要的