python解析torrent文件库:pytorrent
来源:互联网 发布:ipadpro下载软件流程 编辑:程序博客网 时间:2024/06/05 03:07
pytorrent是一个非常小巧的用来解析解析torrent文件python库。核心代码不足150行,却能够完备地解析torrent文件,并支持导出修改后的torrent文件。
使用演示:
import pytorrentt=pytorrent.Torrent()t.load("test.torrent") #your torrent fileprint t.data["info"]["name"].decode("utf-8")files=t.data["info"]["files"]for item in files: print item["path"][0].decode("utf-8")t.data["info"]["name"]="my_name" #change info.t.dump("dump.torrent") #the new torrent file
该库把torrent文件结构映射到python的dict,list,integer,string四种类型,直接操作这四种数据就能读取和修改torrent文件的一切信息。
项目地址
1 0
- python解析torrent文件库:pytorrent
- torrent文件解析器
- torrent文件解析器
- C# 解析 Torrent 文件
- Torrent文件结构解析
- Torrent文件结构解析
- Torrent文件结构解析
- Torrent文件结构解析
- Torrent 文件图文解析
- [C#]Bencode编码算法/torrent文件解析
- Torrent文件
- Torrent文件
- Torrent文件
- Torrent文件
- Torrent文件
- Torrent文件
- Azureus源码剖析(二) ---解析Torrent种子文件
- 利用python开源库制作并验证torrent种子文件
- 九个PHP很有用的功能
- imx6q处理器,linux操作系统平台搭建 从eMMC启动系统
- Linux下find查找命令用法
- ios 支付宝编译时找不到 openssl/asn1.h 文件
- iOS开发:Compile Sources(编译来源)与 Copy Bundle Resources(资源文件)
- python解析torrent文件库:pytorrent
- Lightoj 1008 - Fibsieve`s Fantabulous Birthday
- Caffe入门(1)——Ubuntu 16.04 caffe无GPU模式安装
- ARM Linux系统下如何修改动态IP为静态IP地址
- Windows线程异常捕捉
- 【Light-oj】-1282 - Leading and Trailing(数论,快速幂,log,好)
- django执行原生sql
- 第六章 6.2 参数传递
- 关于LeetCode中Maximum Depth of Binary Tree一题的理解