{ "info": { "author": "Divij Bindlish", "author_email": "dvjbndlsh93@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Topic :: Text Processing" ], "description": "# parse-torrent-name ![Build status](https://travis-ci.org/divijbindlish/parse-torrent-name.svg?branch=master)\n\n> Extract media information from torrent-like filename\n\n![Python versions](https://img.shields.io/badge/Python-2.7%2C%203.3-brightgreen.svg?style=flat-square)\n\nA python port of [J\u0101nis](https://github.com/jzjzjzj)' awesome\n[library](http s://github.com/jzjzjzj/parse-torrent-name) written in \njavascript.\n\nExtract all possible media information present in filenames. Multiple regex \nrules are applied on filename string each of which extracts correponding\ninformation from the filename. If a regex rule matches, the corresponding part\nis removed from the filename. In the end, the remaining part is taken as the\ntitle of the content.\n\n## Why?\n\nOnline APIs by providers like\n[TMDb](https://www.themoviedb.org/documentation/api),\n[TVDb](http://thetvdb.com/wiki/index.php?title=Programmers_API) and\n[OMDb](http://www.omdbapi.com/) don't react to well to search\nqueries which include any kind of extra information. To get proper results from\nthese APIs, only the title of the content should be provided as the search\nquery where this library comes into play. The accuracy of the results can be\nimproved by passing in the year which can also be extracted using this library.\n\n## Usage\n\n```py\nimport PTN\n\ninfo = PTN.parse('A freakishly cool movie or TV episode')\n\nprint info # All details that were parsed\n```\n\nPTN works well for both movies and TV episodes. All meaningful information is\nextracted and returned together in a dictionary. The text which could not be\nparsed is returned in the `excess` field.\n\n### Movies\n\n```py\nPTN.parse('San Andreas 2015 720p WEB-DL x264 AAC-JYK')\n# {\n# 'group': 'JYK',\n# 'title': 'San Andreas',\n# 'resolution': '720p',\n# 'codec': 'x264',\n# 'year': '2015',\n# 'audio': 'AAC',\n# 'quality': 'WEB-DL'\n# }\n\nPTN.parse('The Martian 2015 540p HDRip KORSUB x264 AAC2 0-FGT')\n# {\n# 'group': '0-FGT',\n# 'title': 'The Martian',\n# 'resolution': '540p',\n# 'excess': ['KORSUB', '2'],\n# 'codec': 'x264',\n# 'year': 2015,\n# 'audio': 'AAC',\n# 'quality': 'HDRip'\n# }\n```\n\n### TV episodes \n\n```py\nPTN.parse('Mr Robot S01E05 HDTV x264-KILLERS[ettv]')\n# {\n# 'episode': 5,\n# 'season': 1,\n# 'title': 'Mr Robot',\n# 'codec': 'x264',\n# 'group': 'KILLERS[ettv]'\n# 'quality': 'HDTV'\n# }\n\nPTN.parse('friends.s02e01.720p.bluray-sujaidr')\n# {\n# 'episode': 1,\n# 'season': 2,\n# 'title': 'friends',\n# 'resolution': '720p',\n# 'group': 'sujaidr',\n# 'quality': 'bluray' \n# }\n```\n\n### Note\n\nPTN does not gaurantee the fields `group`, `excess` and `episodeName` as these \nfields might be interchanged with each other. This shoudn't affect most \napplications since episode name can be fetched from an online database \nafter getting the season and episode number correctly.\n\n### Parts extracted\n\n* audio\n* codec\n* container\n* episode\n* episodeName\n* excess\n* extended\n* garbage\n* group\n* hardcoded\n* language\n* proper\n* quality\n* region\n* repack\n* resolution\n* season\n* title\n* website\n* widescreen\n* year\n\n## Install\n\n### Automatic\n\nPTN can be installed automatically using `easy_install` or `pip`.\n\n```sh\n$ easy_install parse-torrent-name\n```\n\nOR \n\n```sh\n$ pip install parse-torrent-name\n```\n\nNote that these commands might require `sudo` permission depending on whether\na virtual environment is used or not.\n\n### Manual\n\nFirst clone the repository.\n\n```sh\n$ git clone https://github.com/divijbindlish/parse-torrent-name PTN && cd PTN\n```\n\nAnd run the command for installing the package.\n\n```sh\n$ python setup.py install\n```\n\n## Contributing\n\nTake a look at the open\n[issues](https://github.com/jzjzjzj/parse-torrent-name/issues) on the original\nproject and submit a PR!\n\n## License\n\nMIT \u00a9 [Divij Bindlish](http://divijbindlish.in)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/divijbindlish/parse-torrent-name", "keywords": "parse parser torrent torrents name names proper rename movie movies tv show shows series extract find quality group codec audio resolution title season episode year information filename filenames file files meaningful", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "parse-torrent-name", "package_url": "https://pypi.org/project/parse-torrent-name/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/parse-torrent-name/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/divijbindlish/parse-torrent-name" }, "release_url": "https://pypi.org/project/parse-torrent-name/1.1.1/", "requires_dist": null, "requires_python": null, "summary": "Extract media information from torrent-like filename", "version": "1.1.1" }, "last_serial": 2322899, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "da62f693ff9b8fc3098704e0ad6edde6", "sha256": "a23f5c3b3ea2243e2ad24f12c9df3f245a5c9443a299fe4e35f556911c16ab5e" }, "downloads": -1, "filename": "parse-torrent-name-0.1.0.tar.gz", "has_sig": false, "md5_digest": "da62f693ff9b8fc3098704e0ad6edde6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7148, "upload_time": "2015-09-01T14:39:48", "url": "https://files.pythonhosted.org/packages/97/a6/31af293b35ac461b9f19bddc381c37e5ecd0dfcbdb637e26502974ab3c54/parse-torrent-name-0.1.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "0ae258beb5a38812ac7b80faa500f2aa", "sha256": "694a6cbfb8dd3888f51dc13156b0fc15dc8cbdecbaf0ef309803904bd499666d" }, "downloads": -1, "filename": "parse-torrent-name-1.0.0.tar.gz", "has_sig": false, "md5_digest": "0ae258beb5a38812ac7b80faa500f2aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8550, "upload_time": "2016-04-01T01:11:41", "url": "https://files.pythonhosted.org/packages/42/23/5062184f45ab1098f4df324dd29bfc7ca3b78b340533ece9f83fab9a8928/parse-torrent-name-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "40509cf1060c3e02ae2ceed739990fd2", "sha256": "1ef6b53c75bbf3edc8b68d2778ae071e6ec57e79c2e644d8aa73978f05881df0" }, "downloads": -1, "filename": "parse-torrent-name-1.1.0.tar.gz", "has_sig": false, "md5_digest": "40509cf1060c3e02ae2ceed739990fd2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8632, "upload_time": "2016-05-12T20:34:32", "url": "https://files.pythonhosted.org/packages/75/c2/8f87a47bc1fd3d5e6a7f3c67ca7d1196b6db5e0b47b14909672daeb92e68/parse-torrent-name-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "2a4d6eb5f8e44dc7bd77690cb4f7bd02", "sha256": "ada6fa9d9f27dee0dece96cbd845962e3d22ec70239fecdc5b71e776c0ec31c4" }, "downloads": -1, "filename": "parse-torrent-name-1.1.1.tar.gz", "has_sig": false, "md5_digest": "2a4d6eb5f8e44dc7bd77690cb4f7bd02", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8976, "upload_time": "2016-09-03T14:56:08", "url": "https://files.pythonhosted.org/packages/1a/c9/fbafe4f215ff24a1209e848763699cb8831d459c138fe164ea45b04c02ea/parse-torrent-name-1.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2a4d6eb5f8e44dc7bd77690cb4f7bd02", "sha256": "ada6fa9d9f27dee0dece96cbd845962e3d22ec70239fecdc5b71e776c0ec31c4" }, "downloads": -1, "filename": "parse-torrent-name-1.1.1.tar.gz", "has_sig": false, "md5_digest": "2a4d6eb5f8e44dc7bd77690cb4f7bd02", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8976, "upload_time": "2016-09-03T14:56:08", "url": "https://files.pythonhosted.org/packages/1a/c9/fbafe4f215ff24a1209e848763699cb8831d459c138fe164ea45b04c02ea/parse-torrent-name-1.1.1.tar.gz" } ] }