{ "info": { "author": "Jae Bradley", "author_email": "jae.b.bradley@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Rotten Tomatoes Client (No API Key Necessary!)\n==============================================\n\n- `Introduction `__\n- `The Not-So-Private Public\n API `__\n- `Client `__\n- `Installation `__\n- `Search `__\n- `Browse TV\n Shows `__\n- `Browse\n Movies `__\n\nIntroduction\n------------\n\nI think Rotten Tomatoes is a pretty neat service. So I wanted to try and\nwork on a couple projects (like a command line tool) that incorporate\ndata from Rotten Tomatoes.\n\nAfter a short cursory investigation of existing Rotten Tomatoes Python\nclients (like\n`rottentomatoes `__ and\n`rtsimple `__) I noticed two things:\n\n1. Each client requires an API key for use (which is reasonable)\n2. The Rotten Tomatoes API is pretty hard to get access to (less\n reasonable).\n\nFor example:\n\n Rotten Tomatoes is no longer issuing API keys at the time of\n registration. We will review each application to ensure the usage of\n our data aligns with Brand Guidelines and Terms of Service and will\n provision keys if approved. There is now a license fee to access the\n API details of which will be provided upon application approval. The\n approval process may take up to 60 days. Thank you for your\n patience.\n\n`From this GitHub\nissue `__.\n\n Thank you for your interest in the Rotten Tomatoes API. API users\n have access to our existing API, which provides full access to\n Rotten Tomatoes Scores and Reviews Snippets (up to 20), for an\n annual fee which starts at $60,000.\n\n`From this Reddit\nthread `__.\n\nThe Not-So-Private Public API\n-----------------------------\n\nIf you go to, say, the `\"Certified Fresh Movies\"\npage `__\n\n.. figure:: http://imgur.com/0LQf7NQ.png\n :alt: alt-text\n\n alt-text\n\nand open up the ``Network`` tab / development console in your browser,\nyou can see HTTP ``GET`` requests like\n\n::\n\n https://www.rottentomatoes.com/api/private/v2.0/browse?minTomato=70&maxTomato=100&maxPopcorn=100&services=amazon%3Bhbo_go%3Bitunes%3Bnetflix_iw%3Bvudu%3Bamazon_prime%3Bfandango_now&certified=true&sortBy=popularity&type=cf-in-theaters\n\nwhich returns a ``JSON`` response that looks like\n\n.. code:: json\n\n {\n \"counts\": {\n \"count\": 14,\n \"total\": 14\n },\n \"debugUrl\": \"http://rt-client-facade-v2-6-1.aws.prod.flixster.com/list/top-box-office/movies?expand=true&include=%5B%22movieSupplementaryInfo%22%2C%22audienceSummary%22%2C%22affiliates%22%2C%22criticSummary%22%2C%22genres%22%2C%22moviePersonnel%22%2C%22moviePersonnel.actors%22%2C%22moviePersonnel.actors.person%22%5D&page=%7B%22limit%22%3A1000%7D\",\n \"results\": [\n {\n \"actors\": [\n \"Chris Pratt\",\n \"Zoe Saldana\",\n \"Dave Bautista\"\n ],\n \"id\": 771385707,\n \"mainTrailer\": {\n \"id\": \"11295755\",\n \"sourceId\": \"http://link.theplatform.com/s/NGweTC/media/dFLWRKu5WPrE\"\n },\n \"mpaaRating\": \"PG13\",\n \"popcornIcon\": \"upright\",\n \"popcornScore\": 90,\n \"posters\": {\n \"primary\": \"https://resizing.flixster.com/Qjh201ZZ1tydptY1QVjOJrYVAis=/130x0/v1.bTsxMjMyMzE1NjtwOzE3MzMyOzEyMDA7NTkxOzg3Ng\",\n \"thumborId\": \"v1.bTsxMjMyMzE1NjtwOzE3MzMyOzEyMDA7NTkxOzg3Ng\"\n },\n \"runtime\": \"2 hr. 17 min.\",\n \"synopsis\": \"Guardians of the Galaxy Vol. 2's action-packed plot, dazzling visuals, and irreverent humor add up to a sequel that's almost as fun -- if not quite as thrillingly fresh -- as its predecessor.\",\n \"synopsisType\": \"consensus\",\n \"theaterReleaseDate\": \"May 5\",\n \"title\": \"Guardians of the Galaxy Vol. 2\",\n \"tomatoIcon\": \"certified_fresh\",\n \"tomatoScore\": 81,\n \"url\": \"/m/guardians_of_the_galaxy_vol_2\"\n },\n {\n \"actors\": [\n \"Michael Fassbender\",\n \"Katherine Waterston\",\n \"Billy Crudup\"\n ],\n \"id\": 771377268,\n \"mainTrailer\": {\n \"id\": \"11295756\",\n \"sourceId\": \"http://link.theplatform.com/s/NGweTC/media/fpqxfaxTIQdB\"\n },\n \"mpaaRating\": \"R\",\n \"popcornIcon\": \"upright\",\n \"popcornScore\": 61,\n \"posters\": {\n \"primary\": \"https://resizing.flixster.com/S2SZABT3ghBipL-urqBzBqhUs-E=/130x0/v1.bTsxMjM0NTY3NjtqOzE3MzMyOzEyMDA7NTM5OzgwMA\",\n \"thumborId\": \"v1.bTsxMjM0NTY3NjtqOzE3MzMyOzEyMDA7NTM5OzgwMA\"\n },\n \"runtime\": \"2 hr. 0 min.\",\n \"synopsis\": \"Alien: Covenant delivers another satisfying round of close-quarters deep-space terror, even if it doesn't take the saga in any new directions.\",\n \"synopsisType\": \"consensus\",\n \"theaterReleaseDate\": \"May 19\",\n \"title\": \"Alien: Covenant\",\n \"tomatoIcon\": \"certified_fresh\",\n \"tomatoScore\": 71,\n \"url\": \"/m/alien_covenant\"\n },\n ...\n ]\n }\n\nEssentially, I've found these \"public\" endpoints for 1. Browsing Movies\n& TV Shows \\* Opening This Week, Top DVD & Streaming, New TV Tonight,\netc. 2. Search \\* Keyword search for movies, franchises, actors, tv\nshows, etc.\n\nI have *not* found endpoints for a given movie / tv show / actor, which\nis annoying.\n\nClient\n------\n\nObviously, with a limited (known) API, there will be an equally limited\nclient interface. Additionally, it goes without saying that since this\nis not an officially-supported API, there are no guarantees about the\nreliability of this client.\n\nInstallation\n~~~~~~~~~~~~\n\n``pip install rotten_tomatoes_client``\n\nSearch\n~~~~~~\n\nThe ```search``\nmethod `__\ntakes a ``term`` to search for and a ``limit``. The default ``limit``\nvalue is ``10``.\n\n.. code:: python\n\n from rotten_tomatoes_client import RottenTomatoesClient\n\n result = RottenTomatoesClient.search(term=\"Indiana Jones\", limit=5)\n\n # The result will look something like this\n # {\n # \"actorCount\": 0,\n # \"actors\": [],\n # \"criticCount\": 0,\n # \"critics\": [],\n # \"franchiseCount\": 1,\n # \"franchises\": [\n # {\n # \"image\": \"https://resizing.flixster.com/s5UqfnC-acCiofUCK2UAyaNjADM=/fit-in/80x80/v1.bjsxNDMzNTI2O2o7MTczODY7MTIwMDs2MDA7MjYy\",\n # \"title\": \"Indiana Jones\",\n # \"url\": \"/franchise/indiana_jones\"\n # }\n # ],\n # \"movieCount\": 31,\n # \"movies\": [\n # {\n # \"castItems\": [\n # {\n # \"name\": \"Harrison Ford\",\n # \"url\": \"/celebrity/harrison_ford\"\n # },\n # {\n # \"name\": \"Karen Allen\",\n # \"url\": \"/celebrity/karen_allen\"\n # },\n # {\n # \"name\": \"Paul Freeman\",\n # \"url\": \"/celebrity/1005456-paul_freeman\"\n # }\n # ],\n # \"image\": \"https://resizing.flixster.com/AGuamVlV_ZyUguJynyXZz5eSapY=/fit-in/80x80/v1.bTsxMTE1NzYxNDtqOzE3NDA5OzEyMDA7MTAxMDsxNTAw\",\n # \"meterClass\": \"certified_fresh\",\n # \"meterScore\": 94,\n # \"name\": \"Raiders of the Lost Ark\",\n # \"subline\": \"Harrison Ford, Karen Allen, Paul Freeman, \",\n # \"url\": \"/m/raiders_of_the_lost_ark\",\n # \"year\": 1981\n # },\n # ...\n # ],\n # \"tvCount\": 0,\n # \"tvSeries\": []\n # }\n\nBrowse TV Shows\n~~~~~~~~~~~~~~~\n\nThere are only three categories for browsing TV shows (located in the\n``TvBrowsingCategory`` enum) \\* ``new_tv_tonight`` \\* ``most_popular``\n\\* ``certified_fresh``\n\nThe ```browse_tv_shows``\nmethod `__\ntakes `a ``TvBrowsingCategory``\nvalue `__.\nIf none is provided, it defaults to using\n```TvBrowsingCategory.most_popular`` `__.\n\n.. code:: python\n\n from rotten_tomatoes_client import RottenTomatoesClient, TvBrowsingCategory\n\n result = RottenTomatoesClient.browse_tv_shows(category=TvBrowsingCategory.most_popular)\n\n # The result will look something like this\n # {\n # \"counts\": {\n # \"count\": 16,\n # \"total\": 16\n # },\n # \"results\": [\n # {\n # \"posters\": {\n # \"primary\": \"https://resizing.flixster.com/OcgpKual3yhynPR3ZbNl1NfHwUE=/2000x3000/v1.dDsyNTQ3OTI7ajsxNzMyNzsxMjAwOzIwMDA7MzAwMA\"\n # },\n # \"title\": \"Twin Peaks: The Return\",\n # \"tomatoIcon\": \"certified\",\n # \"tomatoScore\": 95,\n # \"url\": \"/tv/twin_peaks/s03\"\n # },\n # {\n # \"posters\": {\n # \"primary\": \"https://resizing.flixster.com/ON_GjiBNjJ8InbhnRnr0wCNKGAQ=/2048x3072/v1.dDsyNTI5MDY7ajsxNzMyNzsxMjAwOzIwNDg7MzA3Mg\"\n # },\n # \"title\": \"American Gods: Season 1\",\n # \"tomatoIcon\": \"certified\",\n # \"tomatoScore\": 96,\n # \"url\": \"/tv/american_gods/s01\"\n # },\n # ...\n # ],\n # \"title\": \"Most Popular TV on RT\"\n # }\n\nBrowse Movies\n~~~~~~~~~~~~~\n\nThe ```browse_movies``\nmethod `__\ntakes `a\n``MovieBrowsingQuery`` `__\nthat is composed of the following parameters \\* ``minimum_rating`` \\*\nMinimum allowable RottenTomatoes score \\* Defaults to ``70`` \\*\n``maximum_rating`` \\* Maximum allowable RottenTomatoes score \\* Defaults\nto ``100`` \\* ``services`` \\* A ``list`` of any of `the ``Service`` enum\nvalues `__\nlike\n```Service.amazon`` `__\nor\n```Service.netflix`` `__.\n\\* Defaults to all streaming options. \\* ``certified_fresh`` \\* A\n``boolean`` that represents whether movies that are (or are not)\n\"Certified Fresh\" should be considered. \\* Defaults to ``False`` \\*\n``genres`` \\* A ``list`` of any of `the ``Genre`` enum\nvalues `__\nlike\n```Genre.action`` `__\nor\n```Genre.comedy`` `__.\n\\* Defaults to all genres. \\* ``sort_by`` \\* Can either sort by\npopularity or release date using `the ``SortBy``\nenum `__.\n\\* Defaults to sorting by popularity \\* ``category`` \\* Represents what\ntypes of movies to filter by, for example, ones that are opening in\ntheaters, or have recently been released on DVD / streaming. \\* Takes\nany of `the ``MovieBrowsingCategory`` enum\nvalues `__\nlike\n```MovieBrowsingCategory.certified_fresh_in_theaters`` `__.\n\n.. code:: python\n\n from rotten_tomatoes_client import RottenTomatoesClient, MovieBrowsingQuery, Service, Genre, SortBy, MovieBrowsingCategory\n\n # Give me some relatively shitty action, comedy, or romance movies on Netflix or Amazon Prime, sorted by popularity\n query = MovieBrowsingQuery(minimum_rating=35, maximum_rating=70, services=[Service.netflix, Service.amazon_prime],\n certified_fresh=False, genres=[Genre.action, Genre.comedy, Genre.romance], sort_by=SortBy.popularity,\n category=MovieBrowsingCategory.all_dvd_and_streaming)\n\n result = RottenTomatoesClient.browse_movies(query=query)\n\n # The result will look something like this\n # {\n # \"counts\": {\n # \"count\": 32,\n # \"total\": 771\n # },\n # \"results\": [\n # {\n # \"id\": 10180,\n # \"title\": \"10 Things I Hate About You\",\n # \"url\": \"/m/10_things_i_hate_about_you\",\n # \"tomatoIcon\": \"fresh\",\n # \"tomatoScore\": 61,\n # \"popcornIcon\": \"upright\",\n # \"popcornScore\": 69,\n # \"theaterReleaseDate\": \"Mar 31\",\n # \"dvdReleaseDate\": \"Oct 12\",\n # \"mpaaRating\": \"PG13\",\n # \"synopsis\": \"Julia Stiles and Heath Ledger add strong performances to an unexpectedly clever script, elevating 10 Things (slightly) above typical teen fare.\",\n # \"synopsisType\": \"consensus\",\n # \"runtime\": \"1 hr. 37 min.\",\n # \"posters\": {\n # \"thumborId\": \"v1.bTsxMTIwNzQ3NTtqOzE3NDA5OzEyMDA7MTgwMDsyNDAw\",\n # \"primary\": \"https://resizing.flixster.com/J0m170tQD8igSYaxp2rtyd5N8wU=/130x0/v1.bTsxMTIwNzQ3NTtqOzE3NDA5OzEyMDA7MTgwMDsyNDAw\"\n # },\n # \"actors\": [\n # \"Larisa Oleynik\",\n # \"Julia Stiles\",\n # \"Heath Ledger\"\n # ]\n # },\n # {\n # \"id\": 12852,\n # \"title\": \"Love Actually\",\n # \"url\": \"/m/love_actually\",\n # \"tomatoIcon\": \"fresh\",\n # \"tomatoScore\": 63,\n # \"popcornIcon\": \"upright\",\n # \"popcornScore\": 72,\n # \"theaterReleaseDate\": \"Nov 7\",\n # \"dvdReleaseDate\": \"Apr 27\",\n # \"mpaaRating\": \"R\",\n # \"synopsis\": \"A sugary tale overstuffed with too many stories. Still, the cast charms.\",\n # \"synopsisType\": \"consensus\",\n # \"runtime\": \"2 hr. 15 min.\",\n # \"mainTrailer\": {\n # \"sourceId\": \"http://link.theplatform.com/s/NGweTC/media/yHqz_0l_lb0V\",\n # \"id\": \"11295544\"\n # },\n # \"posters\": {\n # \"thumborId\": \"v1.bTsxMTE3NDgyMjtqOzE3NDA5OzEyMDA7ODAwOzEyMDA\",\n # \"primary\": \"https://resizing.flixster.com/V2-mrbEXdlXN269WjQ_pcuPpNXQ=/130x0/v1.bTsxMTE3NDgyMjtqOzE3NDA5OzEyMDA7ODAwOzEyMDA\"\n # },\n # \"actors\": [\n # \"Bill Nighy\",\n # \"Hugh Grant\",\n # \"Liam Neeson\"\n # ]\n # },\n # {\n # \"id\": 2864421,\n # \"title\": \"Hoodwinked\",\n # \"url\": \"/m/1155109-hoodwinked\",\n # \"tomatoIcon\": \"rotten\",\n # \"tomatoScore\": 46,\n # \"popcornIcon\": \"spilled\",\n # \"popcornScore\": 56,\n # \"theaterReleaseDate\": \"Jan 13\",\n # \"dvdReleaseDate\": \"May 2\",\n # \"mpaaRating\": \"PG\",\n # \"synopsis\": \"This fractured fairytale doesn't have the wit or animation quality to compete with the likes of the Shrek franchise.\",\n # \"synopsisType\": \"consensus\",\n # \"runtime\": \"1 hr. 20 min.\",\n # \"posters\": {\n # \"thumborId\": \"v1.bTsxMTIwOTMwNDtqOzE3NDA5OzEyMDA7MTUzNjsyMDQ4\",\n # \"primary\": \"https://resizing.flixster.com/Nra17Z2DFslffNklaVkXaGmSmw4=/130x0/v1.bTsxMTIwOTMwNDtqOzE3NDA5OzEyMDA7MTUzNjsyMDQ4\"\n # },\n # \"actors\": [\n # \"Glenn Close\",\n # \"Anne Hathaway\",\n # \"Jim Belushi\"\n # ]\n # },\n # ...\n # ]\n # }\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/jaebradley/rotten_tomatoes_client/tarball/0.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jaebradley/rotten_tomatoes_client", "keywords": "rotten_tomatoes", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "rotten_tomatoes_client", "package_url": "https://pypi.org/project/rotten_tomatoes_client/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/rotten_tomatoes_client/", "project_urls": { "Download": "https://github.com/jaebradley/rotten_tomatoes_client/tarball/0.1", "Homepage": "https://github.com/jaebradley/rotten_tomatoes_client" }, "release_url": "https://pypi.org/project/rotten_tomatoes_client/0.0.3/", "requires_dist": null, "requires_python": null, "summary": "Rotten Tomatoes Client", "version": "0.0.3" }, "last_serial": 2907990, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "19dbacbceaa30ba3d98943f9b4b302bb", "sha256": "e33add48de6efc14c97a0282f508f3d18710b9fe168b8399de76de044f52d7b4" }, "downloads": -1, "filename": "rotten_tomatoes_client-0.0.1.tar.gz", "has_sig": false, "md5_digest": "19dbacbceaa30ba3d98943f9b4b302bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2351, "upload_time": "2017-05-27T17:58:35", "url": "https://files.pythonhosted.org/packages/51/e3/088247123ad2242c6b0eeb27130a53ca0a76e9b2a9d1033700a2ffe5b8eb/rotten_tomatoes_client-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "b83b5a1944f8d300cce814f5f9897c67", "sha256": "b2b3b3cb49d63542e1447d45d67e3c042690dde9f10bd10061c3ca7bcf3c1e6d" }, "downloads": -1, "filename": "rotten_tomatoes_client-0.0.2.tar.gz", "has_sig": false, "md5_digest": "b83b5a1944f8d300cce814f5f9897c67", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2369, "upload_time": "2017-05-28T17:59:16", "url": "https://files.pythonhosted.org/packages/01/3b/28a539211868f92739d7a8558536c26b690ea3994b667c3ac0c7b96eb2ba/rotten_tomatoes_client-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "79066fce13c58fa0d481596213289cac", "sha256": "54d52e8e0a88d02e1e4b8870d644f3a0874e7e07e67f73ceb43350d39882a82e" }, "downloads": -1, "filename": "rotten_tomatoes_client-0.0.3.tar.gz", "has_sig": false, "md5_digest": "79066fce13c58fa0d481596213289cac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7340, "upload_time": "2017-05-30T01:22:06", "url": "https://files.pythonhosted.org/packages/b3/73/7d86fecca45ef96e8fff37215381e0a1ad455e12ba3a0a5f5d4e97fec5ba/rotten_tomatoes_client-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "79066fce13c58fa0d481596213289cac", "sha256": "54d52e8e0a88d02e1e4b8870d644f3a0874e7e07e67f73ceb43350d39882a82e" }, "downloads": -1, "filename": "rotten_tomatoes_client-0.0.3.tar.gz", "has_sig": false, "md5_digest": "79066fce13c58fa0d481596213289cac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7340, "upload_time": "2017-05-30T01:22:06", "url": "https://files.pythonhosted.org/packages/b3/73/7d86fecca45ef96e8fff37215381e0a1ad455e12ba3a0a5f5d4e97fec5ba/rotten_tomatoes_client-0.0.3.tar.gz" } ] }