{ "info": { "author": "MaT1g3R", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "# imdb-pie\nPython async IMDB client using the IMDB json web service made available for their iOS app.\n\n## This fork\nThis fork adapts the original library to be used with [Aiohttp](https://github.com/aio-libs/aiohttp).\n\n## Requirements\n\n 1. Python 3.5 or above.\n 2. See requirements.txt\n\n## Install\nThis fork is not on PyPi for now, so you need to install from source.\n```\npip install git+https://github.com/hifumibot/imdb-pie#egg=imdbpie_async\n```\n## How To Use\n\n### Create an instance of ImdbPie\n```python\nfrom imdbpie_async import Imdb\nfrom aiohttp import ClientSession\n\nasync def main():\n imdb = Imdb(ClientSession(), api_key)\n imdb = Imdb(ClientSession(), api_key, anonymize=True) # to proxy requests\n```\n\n### Search for a title by its title\n```python\n>>> await imdb.search_for_title(\"The Dark Knight\")\n[{'title': \"The Dark Knight\", 'year': \"2008\", 'imdb_id': \"tt0468569\"},{'title' : \"Batman Unmasked\", ...}]\n```\n### Search for person by their name\n```python\n>>> await imdb.search_for_person(\"Christian Bale\")\n[{'imdb_id': 'nm0000288', 'name': 'Christian Bale'},{'imdb_id': 'nm7635250', ...}]\n```\n### Find a title by its imdb_id\n```python\n>>> title = await imdb.get_title_by_id(\"tt0468569\")\n>>> title.title\n\"The Dark Knight\"\n>>> title.rating\n8.1\n>>> title.certification\n\"PG-13\"\n```\n### Find a person by their imdb_id\n```python\n>>> person = await imdb.get_person_by_id(\"nm0000151\")\n>>> person.name\n\"Morgan Freeman\"\n>>> person.imdb_id\n\"nm0000151\"\n>>> person.photo_url\n\"https://images-na.ssl-images-amazon.com/images/M/MV5BNzkwNTY1MDYxOF5BMl5BanBnXkFtZTgwNjk4NjM3OTE@._V1_.jpg\"\n```\n\n### Find all episodes for a title by its imdb_id\n\n```python\n>>> await imdb.get_episodes('tt0096697')\n[,\n ,\n ,...]\n\n>>> episode.release_date\n'1989-12-17'\n>>> episode.title\n'Simpsons Roasting on an Open Fire'\n>>> episode.series_name\n'The Simpsons'\n>>> episode.type\n'tv_episode'\n>>> episode.year\n1989\n>>> episode.season\n1\n>>> episode.episode\n1\n>>> episode.imdb_id\n'tt0348034'\n```\n\n### Find a title trailer poster\n```python\n>>> title = await imdb.get_title_by_id(\"tt1210166\")\n>>> title.trailer_image_urls\n[\"http://ia.media-imdb.com/images/M/MV5BODM1NDMxMTI3M15BMl5BanBnXkFtZTcwMDAzODY1Ng@@._V1_.jpg\",...]\n```\n\n### Find the top 250 movies ever\n```python\n>>> await imdb.top_250()\n[{'title': 'The Shawshank Redemption', 'year': '1994', 'type': 'feature', 'rating': 9.3,...}, ...]\n```\n\n### Get the current popular shows\n```python\n>>> await imdb.popular_shows()\n[{\n\t'image': {\n\t\t'height': 2048,\n\t\t'url': 'https://images-na.ssl-images-amazon.com/images/M/MV5BMjE3NTQ1NDg1Ml5BMl5BanBnXkFtZTgwNzY2NDA0MjI@._V1_.jpg',\n\t\t'width': 1382\n\t},\n\t'principals': [{\n\t\t\t'name': 'Emilia Clarke',\n\t\t\t'nconst': 'nm3592338'\n\t\t},\n ...\n\t],\n\t'tconst': 'tt0944947',\n\t'title': 'Game of Thrones',\n\t'type': 'tv_series',\n\t'year': '2011'\n}]\n```\n\n### Get the current popular movies\n```python\n>>> await imdb.popular_movies()\n[{\n\t'prev': 1,\n\t'object': {\n\t\t'tconst': 'tt0944947',\n\t\t'title': 'Game of Thrones',\n\t\t'image': {\n\t\t\t'url': 'https://images-na.ssl-images-amazon.com/images/M/MV5BMjE3NTQ1NDg1Ml5BMl5BanBnXkFtZTgwNzY2NDA0MjI@._V1_.jpg',\n\t\t\t'width': 1382,\n\t\t\t'height': 2048\n\t\t},\n\t\t'year': '2011',\n\t\t'principals': [{\n\t\t\t'nconst': 'nm3592338',\n\t\t\t'name': 'Emilia Clarke'\n\t\t},\n\t\t...\n ],\n\t\t'type': 'tv_series'\n\t},\n\t'rank': 1\n}]\n```\n\n### Check if a title exists\n```python\n>>> await imdb.title_exists('tt1327801')\nTrue\n```\n\n### Get images for a person\nReturns a list of image objects with the following attributes (caption, url, width, height)\n```python\n>>> await imdb.get_person_images(\"nm0000033\")\n[, ,...]\n```\n\n### Get images for a title\nReturns a list of image objects with the following attributes (caption, url, width, height)\n```python\n>>> await imdb.get_title_images(\"tt0468569\")\n[,...]\n```\n\n### Get reviews for a title\nReturns a list of Review objects with the following attributes (username, text, date, rating, summary, status, user_location, user_score, user_score_count)\n```python\n>>> await imdb.get_title_reviews(\"tt0468569\", max_results=15)\n[, ,...]\n```\n\n### Example: Get a title's credit information and check categorisation\n```python\ntitle = await imdb.get_title_by_id(\"tt1210166\")\nfor person in title.credits:\n # check if they are a writer\n if person.token == 'writers':\n print(person.name + ' is a writer')\n else:\n print(person.name + ' is not a writer')\n```\n\n## Running the tests\n\n```bash\npip install -r test_requirements.txt\npy.test tests\n```\n\n## License\nimdb-pie is released under the MIT license. See the license [file](https://github.com/hifumibot/imdb-pie/blob/master/LICENSE) for more details.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hifumibot/imdb-pie", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "imdbpie-async", "package_url": "https://pypi.org/project/imdbpie-async/", "platform": "", "project_url": "https://pypi.org/project/imdbpie-async/", "project_urls": { "Homepage": "https://github.com/hifumibot/imdb-pie" }, "release_url": "https://pypi.org/project/imdbpie-async/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "An async fork to imdb-pie", "version": "1.0.0" }, "last_serial": 3092814, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "757731e408ce970a20109f44f88b6741", "sha256": "bee65888f8fb1ccb7292e70ccc9d9e44fde09e16e9f95ef99d547631fee36f3e" }, "downloads": -1, "filename": "imdbpie_async-1.0.0.tar.gz", "has_sig": false, "md5_digest": "757731e408ce970a20109f44f88b6741", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9223, "upload_time": "2017-08-12T20:53:35", "url": "https://files.pythonhosted.org/packages/64/25/da23758d7bca544417ea39dee4faa44635852deab269a70dbf1e2407f74f/imdbpie_async-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "757731e408ce970a20109f44f88b6741", "sha256": "bee65888f8fb1ccb7292e70ccc9d9e44fde09e16e9f95ef99d547631fee36f3e" }, "downloads": -1, "filename": "imdbpie_async-1.0.0.tar.gz", "has_sig": false, "md5_digest": "757731e408ce970a20109f44f88b6741", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9223, "upload_time": "2017-08-12T20:53:35", "url": "https://files.pythonhosted.org/packages/64/25/da23758d7bca544417ea39dee4faa44635852deab269a70dbf1e2407f74f/imdbpie_async-1.0.0.tar.gz" } ] }