python库在流行的俄罗斯torrent tracker上搜索torrents。
python-nnmclub的Python项目详细描述
python库在流行的俄罗斯torrent tracker上搜索torrents。
安装
通过PIP:
pip install python-nnmclub
用法
importpynnmclubnnmclub=pynnmclub.NNMClub()results=nnmclub.search("Iron Man")
返回一个iterable,其中包含找到的所有激流的指令。
Torrent dict是:
{'topic','detail_url','download_url','size',# in bytes'seeders','leechers','added',# type: datetime.datetime'views','messages','rating_number',# how many people rated this,'rating',# rating. float from 0 to 5'thanks',# how many people thanked this torrent}
注意:使用未本地化的客户端,您将只能获取搜索的前50个结果。
创建授权客户端:
nnmclub=pynnmclub.NNMClub(username,password)
或者使用以前创建的nnmclub客户端:
nnmclub.login(username,password)
如果用户名或密码无效,whis将引发一个pynnmclub.InvalidCredentials错误 (它是pynnmclub.NNMClubError的子级)
还启用了日志记录器pynnmclub,记录解析错误的异常和警告。 它还包括一个完整的HTML错误上下文作为调试消息。
历史
1.0.0(2016-05-13)
- fixed setup.py requires选项(更改为install_requires)
- 版本凹凸
0.1.0(2016-04-11)
- 初始PYPI版本