Go to file
7sDream 98cd6345b8
Fix Issue #2 and do some refractor
- Fix Issue #2, use IOError instead of FileNotFoundError in Python 2
- Use another private obj to represent end of list and dict
- InvalidTorrentFileException -> InvalidTorrentDataException
- Now UnicodeDecodeError is warpped in InvalidTorrentDataException
2017-06-21 00:45:23 +08:00
.gitignore init 2017-05-23 13:35:40 +08:00
LICENSE init 2017-05-23 13:35:40 +08:00
MANIFEST.in init 2017-05-23 13:35:40 +08:00
README.md fix typo in readme 2017-05-23 13:49:54 +08:00
setup.cfg init 2017-05-23 13:35:40 +08:00
setup.py init 2017-05-23 13:35:40 +08:00
test.py fix issue #1 2017-06-20 15:41:54 +08:00
test.torrent fix issue #1 2017-06-20 15:41:54 +08:00
torrent_parser.py Fix Issue #2 and do some refractor 2017-06-21 00:45:23 +08:00

README.md

Torrent file parser for Python

Install

pip install torrent_parser

Usage:

CLI

$ pytp test.torrent
$ cat test.torrent | pytp

As a module

>>> import torrent_parser as tp
>>> data = tp.parse_torrent_file('test.torrent')
>>> print(data['announce'])
http://tracker.trackerfix.com:80/announce

Test

python -m unittest test

LICENSE

See License.