BitTorrent 跟踪器 API 不错吗?
您是否知道任何易于使用、简洁的 Python 或 Perl API 可以与 BitTorrent Tracker 进行交互?例如,我获取一个 torrent 文件,枚举文件中的所有跟踪器,并向跟踪器询问与下载文件相关的对等点的统计信息?
BitTorrent Tracker 规范并不太复杂,但我不想重新发明轮子:)
请注意,我不想下载数据,只是为了获取一些统计数据(Net::BitTorrent 远远超过我需要的)
Do you know of any easy to use, neat API for Python or Perl to interact with BitTorrent Trackers? E.g., I take a torrent file, enumerate all trackers in the file and ask the tracker for the statistics of the peers related with the downloaded file?
BitTorrent Tracker specification is not too complicated, but I don't want to reinvent the wheel :)
Note that I don't want to download the data, just to grab some stats (Net::BitTorrent far more than I need)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
仅简单的命令行还不够吗? :-) (Transmission) 为您提供了transmission-remote工具,允许枚举跟踪器并通过一个命令获取对等统计信息。好吧
,要使用它,您必须使用 Transmission 作为您的 torrent 客户端,但如果您这样做,那么您可以使用 grep 来完成,这取决于您真正想要实现的目标。
Just plain command line isn't enough? :-) (Transmission) gives you transmission-remote tool which permits to enumerate trackers and get peer statistics with one command. Look on
Well, to use it you have to use transmission as your torrent client, but if you do then you can do it with grep, it depends on what really you want to achieve.
看看 py-transmission
编辑:自从我写了这篇文章以来,我发现transmissionbt的RPC接口有非常详细的文档记录并且用户足够友好如果你采取学习基础知识的时间。
Have a look at py-transmission
Edit: Since I wrote this, I found that transmissionbt's RPC interface is extremely well documented and user friendly enough if you take the time to learn the basics.
我制作了 Perl 脚本来从 .torrent 文件获取数据、汇集跟踪器并获取一些统计信息(文件哈希、连接到跟踪器的 IP、文件大小等)。没有什么大科学,只是一些 Perl-fu。要运行它,您需要:安装 Perl 模块 Bencode、curl 和 transmission-show。调试垃圾被发送到stderr,正确的输出被发送到stdout。
I made the Perl script to get data from .torrent files, pool the trackers and get some statistics (file hash, IP connected to the tracker, file size, etc.). No big science, just some Perl-fu. To run it, you need: Perl module Bencode, curl and transmission-show installed. Debug garbage is sent to stderr and the proper output to stdout.