我一直在尝试使用这个python代码http://blog.abhijeetr.com/2011/10/add-trackers-to-torrent-files-in-linux.html来自动将某些公共追踪器添加到torrent文件。BTL.BTFailure:不是有效的合编码字符串
安装BitTorrent-bencode 5.0.8.1并将“bencode.py”-file和“BTL.py”复制到包含我的“add_tracker.py”,“trackers.txt”&“Spaceman.2009 .Xvid-VODO.mp4.torrent”,我得到的错误:
Microsoft Windows [Version 10.0.10240]
(c) 2015 Microsoft Corporation. All rights reserved.
C:\Users\a>cd C:\Users\a\Documents\python\lol
C:\Users\a\Documents\python\lol>add_tracker.py trackers.txt Spaceman.2009.Xvid-VODO.mp4.torrent
Traceback (most recent call last):
File "C:\Users\a\Documents\python\lol\add_tracker.py", line 22, in <module>
decoded_data = bencode.bdecode(torrent_file.read())
File "C:\Users\a\Documents\python\lol\bencode.py", line 68, in bdecode
raise BTFailure("not a valid bencoded string")
BTL.BTFailure: not a valid bencoded string
C:\Users\a\Documents\python\lol>
另外我也试过老 “与给定的初始后给出bencode.py” -version:github上/ shadyabhi/Bencode- Torrent编辑器
它们都挂在同一点。
到目前为止,我的搜索已经表明,这是由于受损的山洪,无效,我已经尝试成群的不同的所有产生相同的结果,同时与torrenteditor.com评估他们。最后,我不能完全/完全不能解析bencode.py和add_tracker.py的实际代码,就像在这里的不同问题中解释的那样,关于使用相同的脚本,我缺乏python的经验。
如果有人能告诉我,为什么会出现这个问题,什么我可以/应该做些什么来解决这个问题,我会相当gratefull :)
我的布局可能不一致遗憾。
你有一个链接到.torrent文件? – Arvid