diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index ee10657..e8996ad 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -22,7 +22,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install vcrpy pytest pytest-cov "urllib3<2.3" + python -m pip install vcrpy pytest pytest-cov "urllib3<2.3" python-dotenv if [ -f requirements.txt ]; then pip install -r requirements.txt; fi python -m pip install -e . - name: Test with pytest diff --git a/docs/source/quickstart.rst b/docs/source/quickstart.rst index 41ba1f8..6c4c46e 100644 --- a/docs/source/quickstart.rst +++ b/docs/source/quickstart.rst @@ -27,7 +27,7 @@ To install ``pyomdbapi``, simply clone the `repository on GitHub $ python setup.py install -`pyomdbapi` supports python versions 3.4 - 3.7 +`pyomdbapi` supports python versions 3.8 - 3.13+ Basic Usage diff --git a/omdb/omdb.py b/omdb/omdb.py index 42aec28..2022121 100644 --- a/omdb/omdb.py +++ b/omdb/omdb.py @@ -303,12 +303,15 @@ def _format_results(self, res, params): "series or season not found!", "series not found!", "series or episode not found!", + "incorrect imdb id.", }: raise OMDBNoResults(res["error"], params) if err == "request limit reached!": raise OMDBLimitReached(self.api_key) if err == "invalid api key!": raise OMDBInvalidAPIKey(self.api_key) + # known reasons: + # Error getting data. raise OMDBException(f"An unknown exception was returned: {err}") return res diff --git a/pyproject.toml b/pyproject.toml index 69ce0f4..3421b49 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,8 +28,8 @@ requires-python = ">=3.8" dependencies = ["requests>=2"] [project.optional-dependencies] -dev = ["ruff", "pytest", "vcrpy", "urllib3<2.3"] -test = ["pytest", "vcrpy", "urllib3<2.3"] +dev = ["ruff", "pytest", "vcrpy", "urllib3<2.3", "python-dotenv"] +test = ["pytest", "vcrpy", "urllib3<2.3", "python-dotenv"] [tool.setuptools.dynamic] version = { attr = "omdb.__version__" } diff --git a/tests/cassettes/episode/Psych/episode-10.yaml b/tests/cassettes/episode/Psych/episode-10.yaml new file mode 100644 index 0000000..5f3725f --- /dev/null +++ b/tests/cassettes/episode/Psych/episode-10.yaml @@ -0,0 +1,59 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?Episode=10&Season=3&apikey=supersecret&t=Psych&type=episode + response: + body: + string: "{\"Title\":\"Six Feet Under the Sea\",\"Year\":\"2009\",\"Rated\":\"TV-PG\",\"Released\":\"09 + Jan 2009\",\"Season\":\"3\",\"Episode\":\"10\",\"Runtime\":\"43 min\",\"Genre\":\"Comedy, + Crime, Mystery\",\"Director\":\"Steve Franks\",\"Writer\":\"Steve Franks\",\"Actors\":\"James + Roday Rodriguez, Dul\xE9 Hill, Timothy Omundson\",\"Plot\":\"Shawn and Gus + are hired by April MacArthur, an attractive marine biologist, who suspects + that a recently released sea lion's death resulted from foul play and thinks + wildlife television host Randy Labayda may be involved.\",\"Language\":\"English\",\"Country\":\"United + States\",\"Awards\":\"N/A\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMTAxODg2MDgyOTBeQTJeQWpwZ15BbWU4MDAwODM1NjIx._V1_SX300.jpg\",\"Ratings\":[],\"Metascore\":\"N/A\",\"imdbRating\":\"N/A\",\"imdbVotes\":\"918\",\"imdbID\":\"tt1189417\",\"seriesID\":\"tt0491738\",\"Type\":\"episode\",\"Response\":\"True\"}" + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f93fba14e13c5aa-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sat, 28 Dec 2024 19:33:38 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '832' + expires: + - Sat, 28 Dec 2024 20:33:35 GMT + last-modified: + - Sat, 28 Dec 2024 19:33:35 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/tests/cassettes/episodes/Battlestar Galactica.yaml b/tests/cassettes/episodes/Battlestar Galactica.yaml new file mode 100644 index 0000000..1c4cf1e --- /dev/null +++ b/tests/cassettes/episodes/Battlestar Galactica.yaml @@ -0,0 +1,255 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?Season=1&apikey=supersecret&t=Battlestar+Galactica&type=episode + response: + body: + string: '{"Title":"Battlestar Galactica","Season":"1","totalSeasons":"4","Episodes":[{"Title":"33","Released":"2005-01-14","Episode":"1","imdbRating":"8.5","imdbID":"tt0519761"},{"Title":"Water","Released":"2005-01-14","Episode":"2","imdbRating":"7.7","imdbID":"tt0519792"},{"Title":"Bastille + Day","Released":"2005-01-21","Episode":"3","imdbRating":"7.6","imdbID":"tt0519763"},{"Title":"Act + of Contrition","Released":"2005-01-28","Episode":"4","imdbRating":"7.7","imdbID":"tt0519762"},{"Title":"You + Can''t Go Home Again","Released":"2005-02-04","Episode":"5","imdbRating":"8.2","imdbID":"tt0519793"},{"Title":"Litmus","Released":"2005-02-11","Episode":"6","imdbRating":"7.6","imdbID":"tt0519778"},{"Title":"Six + Degrees of Separation","Released":"2005-02-18","Episode":"7","imdbRating":"7.7","imdbID":"tt0519786"},{"Title":"Flesh + and Bone","Released":"2005-02-25","Episode":"8","imdbRating":"8.0","imdbID":"tt0519769"},{"Title":"Tigh + Me Up, Tigh Me Down","Released":"2005-03-04","Episode":"9","imdbRating":"7.5","imdbID":"tt0519790"},{"Title":"The + Hand of God","Released":"2005-03-11","Episode":"10","imdbRating":"8.4","imdbID":"tt0519789"},{"Title":"Colonial + Day","Released":"2005-03-18","Episode":"11","imdbRating":"7.6","imdbID":"tt0519765"},{"Title":"Kobol''s + Last Gleaming: Part 1","Released":"2005-03-25","Episode":"12","imdbRating":"8.3","imdbID":"tt0519774"},{"Title":"Kobol''s + Last Gleaming: Part 2","Released":"2005-04-01","Episode":"13","imdbRating":"8.8","imdbID":"tt0519775"}],"Response":"True"}' + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f9ed65c080705d2-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Mon, 30 Dec 2024 03:10:32 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '1495' + expires: + - Mon, 30 Dec 2024 04:10:32 GMT + last-modified: + - Mon, 30 Dec 2024 03:10:32 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?Season=2&apikey=supersecret&t=Battlestar+Galactica&type=episode + response: + body: + string: '{"Title":"Battlestar Galactica","Season":"2","totalSeasons":"4","Episodes":[{"Title":"Scattered","Released":"2005-07-15","Episode":"1","imdbRating":"8.2","imdbID":"tt0519785"},{"Title":"Valley + of Darkness","Released":"2005-07-22","Episode":"2","imdbRating":"7.9","imdbID":"tt0519791"},{"Title":"Fragged","Released":"2005-07-29","Episode":"3","imdbRating":"N/A","imdbID":"tt0519771"},{"Title":"Resistance","Released":"2005-08-05","Episode":"4","imdbRating":"8.0","imdbID":"tt0519780"},{"Title":"The + Farm","Released":"2005-08-12","Episode":"5","imdbRating":"7.7","imdbID":"tt0519788"},{"Title":"Home: + Part 1","Released":"2005-08-19","Episode":"6","imdbRating":"8.0","imdbID":"tt0519772"},{"Title":"Home: + Part 2","Released":"2005-08-26","Episode":"7","imdbRating":"8.3","imdbID":"tt0519773"},{"Title":"Final + Cut","Released":"2005-09-09","Episode":"8","imdbRating":"7.7","imdbID":"tt0519768"},{"Title":"Flight + of the Phoenix","Released":"2005-09-16","Episode":"9","imdbRating":"8.2","imdbID":"tt0519770"},{"Title":"Pegasus","Released":"2005-09-23","Episode":"10","imdbRating":"N/A","imdbID":"tt0519779"},{"Title":"Resurrection + Ship: Part 1","Released":"2006-01-06","Episode":"11","imdbRating":"8.7","imdbID":"tt0519781"},{"Title":"Resurrection + Ship: Part 2","Released":"2006-01-13","Episode":"12","imdbRating":"8.9","imdbID":"tt0519782"},{"Title":"Epiphanies","Released":"2006-01-20","Episode":"13","imdbRating":"7.4","imdbID":"tt0519767"},{"Title":"Black + Market","Released":"2006-01-27","Episode":"14","imdbRating":"6.4","imdbID":"tt0519764"},{"Title":"Scar","Released":"2006-02-03","Episode":"15","imdbRating":"7.3","imdbID":"tt0519784"},{"Title":"Sacrifice","Released":"2006-02-10","Episode":"16","imdbRating":"7.0","imdbID":"tt0519783"},{"Title":"The + Captain''s Hand","Released":"2006-02-17","Episode":"17","imdbRating":"7.6","imdbID":"tt0519787"},{"Title":"Downloaded","Released":"2006-02-24","Episode":"18","imdbRating":"8.4","imdbID":"tt0519766"},{"Title":"Lay + Down Your Burdens: Part 1","Released":"2006-03-03","Episode":"19","imdbRating":"8.0","imdbID":"tt0519776"},{"Title":"Lay + Down Your Burdens: Part 2","Released":"2006-03-10","Episode":"20","imdbRating":"8.7","imdbID":"tt0519777"}],"Response":"True"}' + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f9ed65ddbbdd46d-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Mon, 30 Dec 2024 03:10:32 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '2210' + expires: + - Mon, 30 Dec 2024 04:10:32 GMT + last-modified: + - Mon, 30 Dec 2024 03:10:32 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?Season=3&apikey=supersecret&t=Battlestar+Galactica&type=episode + response: + body: + string: '{"Title":"Battlestar Galactica","Season":"3","totalSeasons":"4","Episodes":[{"Title":"Occupation","Released":"2006-10-06","Episode":"1","imdbRating":"8.2","imdbID":"tt0793695"},{"Title":"Precipice","Released":"2006-10-06","Episode":"2","imdbRating":"8.2","imdbID":"tt0801850"},{"Title":"Exodus: + Part 1","Released":"2006-10-13","Episode":"3","imdbRating":"8.1","imdbID":"tt0801849"},{"Title":"Exodus: + Part 2","Released":"2006-10-20","Episode":"4","imdbRating":"9.1","imdbID":"tt0867671"},{"Title":"Collaborators","Released":"2006-10-27","Episode":"5","imdbRating":"8.1","imdbID":"tt0811218"},{"Title":"Torn","Released":"2006-11-03","Episode":"6","imdbRating":"7.8","imdbID":"tt0811219"},{"Title":"A + Measure of Salvation","Released":"2006-11-10","Episode":"7","imdbRating":"7.6","imdbID":"tt0870871"},{"Title":"Hero","Released":"2006-11-17","Episode":"8","imdbRating":"N/A","imdbID":"tt0887220"},{"Title":"Unfinished + Business","Released":"2006-12-01","Episode":"9","imdbRating":"7.4","imdbID":"tt0903208"},{"Title":"The + Passage","Released":"2006-12-08","Episode":"10","imdbRating":"7.5","imdbID":"tt0887222"},{"Title":"The + Eye of Jupiter","Released":"2006-12-15","Episode":"11","imdbRating":"N/A","imdbID":"tt0887221"},{"Title":"Rapture","Released":"2007-01-21","Episode":"12","imdbRating":"8.2","imdbID":"tt0909050"},{"Title":"Taking + a Break from All Your Worries","Released":"2007-01-28","Episode":"13","imdbRating":"7.7","imdbID":"tt0944310"},{"Title":"The + Woman King","Released":"2007-02-11","Episode":"14","imdbRating":"7.0","imdbID":"tt0947108"},{"Title":"A + Day in the Life","Released":"2007-02-18","Episode":"15","imdbRating":"7.0","imdbID":"tt0947103"},{"Title":"Dirty + Hands","Released":"2007-02-25","Episode":"16","imdbRating":"7.5","imdbID":"tt0947106"},{"Title":"Maelstrom","Released":"2007-03-04","Episode":"17","imdbRating":"7.9","imdbID":"tt0944309"},{"Title":"The + Son Also Rises","Released":"2007-03-11","Episode":"18","imdbRating":"7.6","imdbID":"tt0947107"},{"Title":"Crossroads: + Part 1","Released":"2007-03-18","Episode":"19","imdbRating":"8.3","imdbID":"tt0947104"},{"Title":"Crossroads: + Part 2","Released":"2007-03-25","Episode":"20","imdbRating":"9.2","imdbID":"tt0947105"}],"Response":"True"}' + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f9ed65f6c7cc9bb-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Mon, 30 Dec 2024 03:10:33 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '2212' + expires: + - Mon, 30 Dec 2024 04:10:32 GMT + last-modified: + - Mon, 30 Dec 2024 03:10:32 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?Season=4&apikey=supersecret&t=Battlestar+Galactica&type=episode + response: + body: + string: '{"Title":"Battlestar Galactica","Season":"4","totalSeasons":"4","Episodes":[{"Title":"He + That Believeth in Me","Released":"2008-04-04","Episode":"1","imdbRating":"8.3","imdbID":"tt0993910"},{"Title":"Six + of One","Released":"2008-04-11","Episode":"2","imdbRating":"7.9","imdbID":"tt0993921"},{"Title":"The + Ties That Bind","Released":"2008-04-18","Episode":"3","imdbRating":"N/A","imdbID":"tt0993925"},{"Title":"Escape + Velocity","Released":"2008-04-25","Episode":"4","imdbRating":"7.4","imdbID":"tt0993926"},{"Title":"The + Road Less Traveled","Released":"2008-05-02","Episode":"5","imdbRating":"7.5","imdbID":"tt0993927"},{"Title":"Faith","Released":"2008-05-09","Episode":"6","imdbRating":"N/A","imdbID":"tt0993928"},{"Title":"Guess + What''s Coming to Dinner","Released":"2008-05-16","Episode":"7","imdbRating":"8.5","imdbID":"tt0993929"},{"Title":"Sine + Qua Non","Released":"2008-05-30","Episode":"8","imdbRating":"7.6","imdbID":"tt0993930"},{"Title":"The + Hub","Released":"2008-06-06","Episode":"9","imdbRating":"8.6","imdbID":"tt0993931"},{"Title":"Revelations","Released":"2008-06-13","Episode":"10","imdbRating":"N/A","imdbID":"tt0993911"},{"Title":"Sometimes + a Great Notion","Released":"2009-01-16","Episode":"11","imdbRating":"8.7","imdbID":"tt1239323"},{"Title":"A + Disquiet Follows My Soul","Released":"2009-01-23","Episode":"12","imdbRating":"N/A","imdbID":"tt0993913"},{"Title":"The + Oath","Released":"2009-01-30","Episode":"13","imdbRating":"9.0","imdbID":"tt0993914"},{"Title":"Blood + on the Scales","Released":"2009-02-06","Episode":"14","imdbRating":"9.1","imdbID":"tt0993915"},{"Title":"No + Exit","Released":"2009-02-13","Episode":"15","imdbRating":"8.4","imdbID":"tt0993916"},{"Title":"Deadlock","Released":"2009-02-20","Episode":"16","imdbRating":"7.4","imdbID":"tt0993917"},{"Title":"Someone + to Watch Over Me","Released":"2009-02-27","Episode":"17","imdbRating":"8.1","imdbID":"tt0993918"},{"Title":"Islanded + in a Stream of Stars","Released":"2009-03-06","Episode":"18","imdbRating":"N/A","imdbID":"tt0993919"},{"Title":"Daybreak: + Part 1","Released":"2009-03-13","Episode":"19","imdbRating":"8.4","imdbID":"tt0993920"},{"Title":"Daybreak: + Part 2","Released":"2009-03-20","Episode":"20","imdbRating":"9.0","imdbID":"tt0993922"},{"Title":"Daybreak: + Part 3","Released":"2009-03-25","Episode":"21","imdbRating":"8.6","imdbID":"tt12394444"}],"Response":"True"}' + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f9ed660cd4b68ee-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Mon, 30 Dec 2024 03:10:33 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '2364' + expires: + - Mon, 30 Dec 2024 04:10:33 GMT + last-modified: + - Mon, 30 Dec 2024 03:10:33 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/tests/cassettes/episodes/Psych.yaml b/tests/cassettes/episodes/Psych.yaml new file mode 100644 index 0000000..2b631a8 --- /dev/null +++ b/tests/cassettes/episodes/Psych.yaml @@ -0,0 +1,66 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?Season=3&apikey=supersecret&t=Psych&type=episode + response: + body: + string: '{"Title":"Psych","Season":"3","totalSeasons":"8","Episodes":[{"Title":"Ghosts","Released":"2008-07-18","Episode":"1","imdbRating":"8.1","imdbID":"tt1189416"},{"Title":"Murder?... + Anyone?... Anyone?... Bueller?","Released":"2008-07-25","Episode":"2","imdbRating":"8.9","imdbID":"tt1189424"},{"Title":"Daredevils!","Released":"2008-08-01","Episode":"3","imdbRating":"N/A","imdbID":"tt1189425"},{"Title":"The + Greatest Adventure in the History of Basic Cable","Released":"2008-08-08","Episode":"4","imdbRating":"8.5","imdbID":"tt1189426"},{"Title":"Disco + Didn''t Die. It Was Murdered!","Released":"2008-08-15","Episode":"5","imdbRating":"8.3","imdbID":"tt1189427"},{"Title":"There + Might Be Blood","Released":"2008-08-22","Episode":"6","imdbRating":"N/A","imdbID":"tt1189428"},{"Title":"Talk + Derby to Me","Released":"2008-09-05","Episode":"7","imdbRating":"8.1","imdbID":"tt1189429"},{"Title":"Gus + Walks Into a Bank","Released":"2008-09-12","Episode":"8","imdbRating":"N/A","imdbID":"tt1189430"},{"Title":"Christmas + Joy","Released":"2008-11-28","Episode":"9","imdbRating":"N/A","imdbID":"tt1189431"},{"Title":"Six + Feet Under the Sea","Released":"2009-01-09","Episode":"10","imdbRating":"N/A","imdbID":"tt1189417"},{"Title":"Lassie + Did a Bad, Bad Thing","Released":"2009-01-16","Episode":"11","imdbRating":"8.7","imdbID":"tt1189418"},{"Title":"Earth, + Wind and... Wait for It","Released":"2009-01-23","Episode":"12","imdbRating":"8.1","imdbID":"tt1189419"},{"Title":"Any + Given Friday Night at 10PM, 9PM Central","Released":"2009-01-30","Episode":"13","imdbRating":"N/A","imdbID":"tt1189420"},{"Title":"Truer + Lies","Released":"2009-02-06","Episode":"14","imdbRating":"N/A","imdbID":"tt1189421"},{"Title":"Tuesday + the 17th","Released":"2009-02-13","Episode":"15","imdbRating":"9.0","imdbID":"tt1189422"},{"Title":"An + Evening with Mr. Yang","Released":"2009-02-20","Episode":"16","imdbRating":"9.4","imdbID":"tt1189423"}],"Response":"True"}' + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f93ea95df9b0806-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sat, 28 Dec 2024 19:21:57 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '1929' + expires: + - Sat, 28 Dec 2024 20:21:57 GMT + last-modified: + - Sat, 28 Dec 2024 19:21:57 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/tests/cassettes/exceptions/limit_reached/order.yaml b/tests/cassettes/exceptions/limit_reached/order.yaml new file mode 100644 index 0000000..b18051c --- /dev/null +++ b/tests/cassettes/exceptions/limit_reached/order.yaml @@ -0,0 +1,582 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&page=1&s=order + response: + body: + string: "{\"Search\":[{\"Title\":\"Harry Potter and the Order of the Phoenix\",\"Year\":\"2007\",\"imdbID\":\"tt0373889\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BYWJmM2M1YzItMjY1Ni00YzRmLTg5YWYtNDFmNTJjNzQ0ODkyXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Law + & Order: Special Victims Unit\",\"Year\":\"1999\u2013\",\"imdbID\":\"tt0203259\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BZmI0MDdiZGQtNGZlOC00NGE1LTg3MDItOGZkMGVjZDM3NGE0XkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Law + & Order\",\"Year\":\"1990\u2013\",\"imdbID\":\"tt0098844\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BM2E1NDhhMjgtZTE5My00ZWQ5LWE1YzEtOTdlOTljODhmNmE4XkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"The + Order\",\"Year\":\"2019\u20132020\",\"imdbID\":\"tt8295472\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMjMxOWIwMGUtZGZkZi00MmE1LWJlZDYtMjYzODU0MjhjMWNjXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"In + Order of Disappearance\",\"Year\":\"2014\",\"imdbID\":\"tt2675914\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMTUzNTA0NTY0Nl5BMl5BanBnXkFtZTgwNTI1NDgzOTE@._V1_SX300.jpg\"},{\"Title\":\"Law + & Order: Criminal Intent\",\"Year\":\"2001\u20132011\",\"imdbID\":\"tt0275140\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMjEzNTIxMTk3MF5BMl5BanBnXkFtZTcwODQ3NTg1MQ@@._V1_SX300.jpg\"},{\"Title\":\"Illegal + - Justice, Out of Order\",\"Year\":\"2020\u20132024\",\"imdbID\":\"tt10308632\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BZTZlMmJjY2ItM2FlOS00YTA0LTkwMDItY2Q5YmE3NTM1ZTYzXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"The + Order\",\"Year\":\"2003\",\"imdbID\":\"tt0304711\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMTUxOTU5NDU2N15BMl5BanBnXkFtZTgwMDgyMjYyMDI@._V1_SX300.jpg\"},{\"Title\":\"Law + & Order: Organized Crime\",\"Year\":\"2021\u2013\",\"imdbID\":\"tt12677870\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMmJlODdlYTAtMDRkYy00NTY0LTlmZjktODBhZWU1ZTE5ZjBhXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"New + Order\",\"Year\":\"2020\",\"imdbID\":\"tt12474056\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BOWQ3MGI5ZWItZjc5NC00MDgwLWIzOWMtN2RlNjE2NTUwNWMwXkEyXkFqcGc@._V1_SX300.jpg\"}],\"totalResults\":\"777\",\"Response\":\"True\"}" + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f93ff76fd17209c-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sat, 28 Dec 2024 19:36:12 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '2156' + expires: + - Sat, 28 Dec 2024 20:36:12 GMT + last-modified: + - Sat, 28 Dec 2024 19:36:12 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&page=2&s=order + response: + body: + string: "{\"Search\":[{\"Title\":\"The Order\",\"Year\":\"2001\",\"imdbID\":\"tt0193364\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BZmI5MmVlZWItYzcwOS00MmI3LThjZjktZTM1ZjQzMzk0NTExXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Star + Wars Jedi: Fallen Order\",\"Year\":\"2019\",\"imdbID\":\"tt5691474\",\"Type\":\"game\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMjhhNzNmNGItZGVjYi00N2E5LTliNTktYTMyMGFkZjYzNGEwXkEyXkFqcGdeQXVyMTQ4MjM0MjA@._V1_SX300.jpg\"},{\"Title\":\"Christmas + Made to Order\",\"Year\":\"2018\",\"imdbID\":\"tt9028880\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BNjlhODQxZTktZWQyYi00MjYxLWJkZWQtZjYyNmRhZGY5NThjXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Law + & Order: UK\",\"Year\":\"2009\u20132014\",\"imdbID\":\"tt1166893\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BODI0NzhiN2EtYzFhMC00NDViLThhZTAtMGZjMDI3MTNlNDQ1XkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Wolfenstein: + The New Order\",\"Year\":\"2014\",\"imdbID\":\"tt3382518\",\"Type\":\"game\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BNTU5MTczMjUtNDVhYy00NTkwLTg0MjYtY2FiMTBkNzIzYzFlXkEyXkFqcGdeQXVyMjM5NzU3OTM@._V1_SX300.jpg\"},{\"Title\":\"Blue + World Order\",\"Year\":\"2017\",\"imdbID\":\"tt4457678\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BZmI0ODczYTUtMjU0ZS00YmZkLTg5MDgtMmFmZTdkZTRhMzdkXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Scanners + II: The New Order\",\"Year\":\"1991\",\"imdbID\":\"tt0102848\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMTY1M2E5MTktNjljYS00NTkxLTg4NGItMzNhZTBhNTIyYzk3XkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Maid + to Order\",\"Year\":\"1987\",\"imdbID\":\"tt0093476\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMmVmMTcxNDEtZWRkZC00NTg0LThjYTktMjdkNzlkZDU2MmNiXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"The + Divine Order\",\"Year\":\"2017\",\"imdbID\":\"tt5818818\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMmJkYjRkMjAtNzRhZC00NmRiLThjMTktNTA5YWFjOTg3ZmQ4XkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Law + & Order True Crime\",\"Year\":\"2017\",\"imdbID\":\"tt6110318\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMjQ1NDI2MTA4Nl5BMl5BanBnXkFtZTgwNzUyODkwMzI@._V1_SX300.jpg\"}],\"totalResults\":\"777\",\"Response\":\"True\"}" + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f93ff787b67f27c-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sat, 28 Dec 2024 19:36:13 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '2158' + expires: + - Sat, 28 Dec 2024 20:36:13 GMT + last-modified: + - Sat, 28 Dec 2024 19:36:13 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&page=3&s=order + response: + body: + string: "{\"Search\":[{\"Title\":\"Law & Order: LA\",\"Year\":\"2010\u20132011\",\"imdbID\":\"tt1657081\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BNTAzOGI5YmEtOGJhMC00MTc2LThjODgtNjdmODAzZGQwYjg1XkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"The + Thinning: New World Order\",\"Year\":\"2018\",\"imdbID\":\"tt7764650\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BNzZkZjlmNWUtM2YxNi00MmZkLWE2OWQtODcxNzgwZDliNjNkXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Executive + Order\",\"Year\":\"2020\",\"imdbID\":\"tt10395866\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BZGM5MjdkNWEtZGI3Mi00YTk5LTkzNWMtZjkzODA5YTQ1MmExXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Knights + of the Teutonic Order\",\"Year\":\"1960\",\"imdbID\":\"tt0054004\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BODM5NGU5ZDItN2E2MS00OGZmLWEyZmEtNWEwZGRhMzYyODlmXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Harry + Potter and the Order of the Phoenix\",\"Year\":\"2007\",\"imdbID\":\"tt0944836\",\"Type\":\"game\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BN2VhOGI0OTItZjVhMC00MThmLWI5YzEtYTk5ZTFhMjEzOGEzXkEyXkFqcGdeQXVyNzg5OTk2OA@@._V1_SX300.jpg\"},{\"Title\":\"Gas! + -Or- It Became Necessary to Destroy the World in Order to Save It.\",\"Year\":\"1970\",\"imdbID\":\"tt0065760\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BOGEyZjQzMWUtNzE4Zi00Y2NhLWFkYzctNGZiNTQzY2VmYjBlXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Kill + Order\",\"Year\":\"2017\",\"imdbID\":\"tt3847642\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BYWY0OTU5MjItZjdmNi00NTZjLTkzNWUtNjc4MDZkMTA1Y2QxXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Ecstasy + of Order: The Tetris Masters\",\"Year\":\"2011\",\"imdbID\":\"tt1836974\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMTkwNTY0MDg3NV5BMl5BanBnXkFtZTcwNTQwMzI5Nw@@._V1_SX300.jpg\"},{\"Title\":\"Law + & Order: Trial by Jury\",\"Year\":\"2005\u20132006\",\"imdbID\":\"tt0406429\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMWZkNzVkNTktMGJhZi00NzY4LTlkMGMtZjllYjY0NGVlYTAxXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Order + of Chaos\",\"Year\":\"2010\",\"imdbID\":\"tt1159721\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMTI4NDg2MzE4MV5BMl5BanBnXkFtZTcwNzcyMjMzMg@@._V1_SX300.jpg\"}],\"totalResults\":\"777\",\"Response\":\"True\"}" + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f93ff7a2bd9e61b-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sat, 28 Dec 2024 19:36:13 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '2227' + expires: + - Sat, 28 Dec 2024 20:36:13 GMT + last-modified: + - Sat, 28 Dec 2024 19:36:13 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&page=4&s=order + response: + body: + string: "{\"Search\":[{\"Title\":\"Last Order: Final Fantasy VII\",\"Year\":\"2005\",\"imdbID\":\"tt0489134\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMWVmN2RiY2UtNzk1YS00M2E3LWEwNTctOTc1NzhmZTc3N2JkXkEyXkFqcGdeQXVyNzg5OTk2OA@@._V1_SX300.jpg\"},{\"Title\":\"Love, + Fall & Order\",\"Year\":\"2019\",\"imdbID\":\"tt10887504\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BYzI3YWYwY2EtYzMwMS00YTkyLTk5OTMtZjFmMGI0NWY0NGJmXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Mail + Order Wife\",\"Year\":\"2004\",\"imdbID\":\"tt0377088\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMTc0OTg2ODUzNV5BMl5BanBnXkFtZTcwNTE2MDkyMQ@@._V1_SX300.jpg\"},{\"Title\":\"Fate/Grand + Order: First Order\",\"Year\":\"2016\",\"imdbID\":\"tt6213810\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BOWFlZjk2NGMtZGUwNS00YTY3LTg4YjgtNGMwODFhZTg0MTJjXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Order + of Death\",\"Year\":\"1983\",\"imdbID\":\"tt0085366\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BNGNhYmI5MjYtZmM2OS00OGFjLTkxMjctYzcwZWYxNzU0NjJkXkEyXkFqcGdeQXVyMTE2OTg4Mjg@._V1_SX300.jpg\"},{\"Title\":\"Fate/Grand + Order - Absolute Demonic Front: Babylonia\",\"Year\":\"2019\u20132020\",\"imdbID\":\"tt9525238\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMjJmYTUwYjQtYWMxZS00YTAxLWJlM2MtNjliNmY0MTUxY2RjXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Law + & Order Toronto: Criminal Intent\",\"Year\":\"2024\u2013\",\"imdbID\":\"tt27954448\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BZjFlYjMzZjQtMzg1ZC00MGQ1LWFkNmUtNTM3NTZmMmRmNDJhXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Law + and Order\",\"Year\":\"1953\",\"imdbID\":\"tt0045991\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BNTA1MThmNTAtMDIyOC00OTFiLWE5YzktNzZiNDA4M2Y4NjY0XkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Out + of Order\",\"Year\":\"2003\",\"imdbID\":\"tt0329476\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BNTk2YzNiOGQtODU3NS00NWI2LTgxZGItOGQ0YTFlMzAwMjI3XkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"New + World Order\",\"Year\":\"2009\",\"imdbID\":\"tt1215983\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BYWNhM2Q1NTgtMjc0Mi00ZjRlLWI1MmQtMDZmNDY0MDVlNTg1XkEyXkFqcGc@._V1_SX300.jpg\"}],\"totalResults\":\"777\",\"Response\":\"True\"}" + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f93ff7b1ee458c6-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sat, 28 Dec 2024 19:36:13 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '2205' + expires: + - Sat, 28 Dec 2024 20:36:13 GMT + last-modified: + - Sat, 28 Dec 2024 19:36:13 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&page=5&s=order + response: + body: + string: "{\"Search\":[{\"Title\":\"The Order: 1886\",\"Year\":\"2015\",\"imdbID\":\"tt2973402\",\"Type\":\"game\",\"Poster\":\"N/A\"},{\"Title\":\"Mail + Order Monster\",\"Year\":\"2018\",\"imdbID\":\"tt4694366\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BNzM0MGEwMGUtZGFjMi00ZjQ2LTg5ZjctYzc5MzAwYjgzOWNjXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Frankie + Boyle's New World Order\",\"Year\":\"2017\u20132022\",\"imdbID\":\"tt7294498\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BODVhMmM2MTEtODg2My00MTYxLTg1MmUtMTAzOTNiMjFmODhiXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Mail + Order Bride\",\"Year\":\"1964\",\"imdbID\":\"tt0058318\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BNzAzYjQ0NmYtODE5OS00MjI2LWFiMjEtZWM0ZTc3NjdhZGI3XkEyXkFqcGdeQXVyMTY5Nzc4MDY@._V1_SX300.jpg\"},{\"Title\":\"The + Order of Myths\",\"Year\":\"2008\",\"imdbID\":\"tt1157694\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMTQ0MjI3NzY5Nl5BMl5BanBnXkFtZTcwMzk0NTEwMg@@._V1_SX300.jpg\"},{\"Title\":\"Point + of Order!\",\"Year\":\"1964\",\"imdbID\":\"tt0058481\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BODQwOTU3MDE4Ml5BMl5BanBnXkFtZTcwODIzNzAzMQ@@._V1_SX300.jpg\"},{\"Title\":\"The + Order of the Black Eagle\",\"Year\":\"1987\",\"imdbID\":\"tt0199912\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMTY2MTc5NjY1N15BMl5BanBnXkFtZTgwOTYyOTk1MDE@._V1_SX300.jpg\"},{\"Title\":\"Mail + Order Bride\",\"Year\":\"2008\",\"imdbID\":\"tt1320431\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BZDUwNzQ0ZGYtNjkyMS00OWQyLWE2YzctODQ4NjE3MmJlNTYxXkEyXkFqcGdeQXVyMTY5Nzc4MDY@._V1_SX300.jpg\"},{\"Title\":\"The + Order\",\"Year\":\"2024\",\"imdbID\":\"tt26625693\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BZWIxOGQyYjYtOGEwOC00YWNjLWJmNTktZjJlM2RmNTdjMmVlXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"The + Order of Time\",\"Year\":\"2023\",\"imdbID\":\"tt15205344\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BNTYyMDYzZTAtYWU0Ni00NDYzLTgzZDItOGVjYTI0NDRlNGFhXkEyXkFqcGc@._V1_SX300.jpg\"}],\"totalResults\":\"777\",\"Response\":\"True\"}" + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f93ff7cb97ec97b-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sat, 28 Dec 2024 19:36:13 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '2006' + expires: + - Sat, 28 Dec 2024 20:36:13 GMT + last-modified: + - Sat, 28 Dec 2024 19:36:13 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&page=6&s=order + response: + body: + string: "{\"Search\":[{\"Title\":\"New Order\",\"Year\":\"2012\",\"imdbID\":\"tt1954688\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMTQ4NDY1NDU4MV5BMl5BanBnXkFtZTcwNDIxNjc1Ng@@._V1_SX300.jpg\"},{\"Title\":\"Law + and Order\",\"Year\":\"1969\",\"imdbID\":\"tt0064577\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BNGU4OGEwMGItYWYzYi00NTE1LWE4NWMtNGE4ZWI3MzAwZjFjXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Fate/Grand + Order the Movie: Divine Realm of the Round Table: Camelot\",\"Year\":\"2020\",\"imdbID\":\"tt9534948\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BYTQwNzMwMWUtNjI3NC00MmMxLWEwODgtMDU3NmVhZmY2NWJlXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Big + Order\",\"Year\":\"2016\u2013\",\"imdbID\":\"tt5686870\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BYmQ2ZWQ4YWEtNWNmYy00Y2MxLWI3OTUtMDJiNGQyMTQ0MTllXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Order + & Disorder\",\"Year\":\"2012\",\"imdbID\":\"tt2510620\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BYmM0MjMxMTctYWIxOS00NWQwLThiOGUtNWFmODViZmNlYzliXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Is + the Order a Rabbit?\",\"Year\":\"2014\u2013\",\"imdbID\":\"tt3517010\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BZGExOTYxZWQtYzhlMi00MDllLThlMzMtZDBkY2VmM2VlMjg4XkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Fate + Grand Order: The Grand Temple of Time\",\"Year\":\"2021\",\"imdbID\":\"tt12007484\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BYmYyMjlkZWItNzI5NS00MjRlLWFkZTQtNzNlMWRhZDRkNmZhXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Short + Order\",\"Year\":\"2005\",\"imdbID\":\"tt0426214\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMTEwODE1ODE0MTheQTJeQWpwZ15BbWU3MDI0NDY0NjE@._V1_SX300.jpg\"},{\"Title\":\"New + World Order: Communism by Backdoor\",\"Year\":\"2014\",\"imdbID\":\"tt4287528\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BYWY4YWJiN2MtNjNhNy00MGFhLWFmMTgtMmQxYjQzNmY3M2NiXkEyXkFqcGdeQXVyNjc2NzQ4NTA@._V1_SX300.jpg\"},{\"Title\":\"Side + Order of Life\",\"Year\":\"2007\",\"imdbID\":\"tt0862824\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMTM2NzUxNDE3N15BMl5BanBnXkFtZTcwMTU1MzM1MQ@@._V1_SX300.jpg\"}],\"totalResults\":\"777\",\"Response\":\"True\"}" + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f93ff7e6ff4c94c-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sat, 28 Dec 2024 19:36:14 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '2166' + expires: + - Sat, 28 Dec 2024 20:36:13 GMT + last-modified: + - Sat, 28 Dec 2024 19:36:13 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&page=7&s=order + response: + body: + string: '{"Search":[{"Title":"Law and Order","Year":"1932","imdbID":"tt0023121","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BMDdjYzE5MmYtODZhZC00YTYyLWE3YTktZjc3YmU1YWRjODAxXkEyXkFqcGc@._V1_SX300.jpg"},{"Title":"Mail + Order Bride","Year":"2003","imdbID":"tt0339607","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BNGMyZGFlYTEtYzI1ZS00OWNmLWJjNTktNzhiOGZkMWU1ZmYwXkEyXkFqcGdeQXVyMTY5Nzc4MDY@._V1_SX300.jpg"},{"Title":"Restraining + Order","Year":"1999","imdbID":"tt0167150","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BMjA4NTk3ODYwNl5BMl5BanBnXkFtZTcwNDE1NjQyMQ@@._V1_SX300.jpg"},{"Title":"Fate/Grand + Order The Movie Divine Realm Of The Round Table: Camelot Paladin; Agateram","Year":"2021","imdbID":"tt13997358","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BYWQyYTliNWQtZmM0NS00MTg2LTg1MzgtOTc1YTNmZTliNDYxXkEyXkFqcGc@._V1_SX300.jpg"},{"Title":"New + World Order: The End Has Come","Year":"2013","imdbID":"tt2210855","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BMTM3Nzc2Njk5MF5BMl5BanBnXkFtZTcwNTM3Mjg0OQ@@._V1_SX300.jpg"},{"Title":"The + Order of Things","Year":"2017","imdbID":"tt7340764","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BYjMzZTI2NGUtMTliNS00ZjZmLTg0YjMtMzEwOTY5NWNiYzUxXkEyXkFqcGc@._V1_SX300.jpg"},{"Title":"Law + and Order: Really Special Victims Unit","Year":"2009","imdbID":"tt1379663","Type":"movie","Poster":"N/A"},{"Title":"Moral + Order","Year":"2020","imdbID":"tt7490358","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BNzllZjc1OTctZTU2ZS00YjUwLWI1MDgtYjJmNzhmMjYyYTZhXkEyXkFqcGdeQXVyNjg1NTY4MA@@._V1_SX300.jpg"},{"Title":"Out + of Order","Year":"2015","imdbID":"tt3914600","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BY2Q3NjQ2NjQtMzZhNy00ZDg3LThiYjAtNmIwNjNiNTBlN2FmXkEyXkFqcGdeQXVyMjg0MzMwNzg@._V1_SX300.jpg"},{"Title":"I + Was a Mail Order Bride","Year":"1982","imdbID":"tt0084110","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BY2ZmOWY4MmYtYTFiZi00MmEzLWEwODgtM2U2ZTc3NThhYWNkXkEyXkFqcGc@._V1_SX300.jpg"}],"totalResults":"777","Response":"True"}' + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f93ff805dadf274-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sat, 28 Dec 2024 19:36:14 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '2119' + expires: + - Sat, 28 Dec 2024 20:36:14 GMT + last-modified: + - Sat, 28 Dec 2024 19:36:14 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&page=8&s=order + response: + body: + string: "{\"Search\":[{\"Title\":\"Indiana Jones and the Sanctuary of the Black + Order\",\"Year\":\"2021\",\"imdbID\":\"tt10075650\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BZjVkYzY4OWEtMjc2OC00YTQ0LWIwMmUtYTRlODc3ODBmZjcxXkEyXkFqcGdeQXVyMjkyODc0ODk@._V1_SX300.jpg\"},{\"Title\":\"Out + of Order\",\"Year\":\"1992\",\"imdbID\":\"tt0105709\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BNzc4OTJkNTYtNDU0ZS00OTE2LTk1NmQtNjEwZmJlZmUzYTAxXkEyXkFqcGdeQXVyMzU0NzkwMDg@._V1_SX300.jpg\"},{\"Title\":\"Pecking + Order\",\"Year\":\"2017\",\"imdbID\":\"tt6760956\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BOWI1ZTEwYzQtOTgxZi00ZGRjLWI2YTMtMGZjNTJjNDM0YzlhXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"The + Order: First Degree\",\"Year\":\"2014\",\"imdbID\":\"tt4024076\",\"Type\":\"movie\",\"Poster\":\"N/A\"},{\"Title\":\"New + Order: Decades\",\"Year\":\"2018\",\"imdbID\":\"tt9404440\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BZDhhZWU4ZjktNTRiNS00YjMyLTkxM2EtZDQwNmVjOTdjNmI2XkEyXkFqcGdeQXVyOTA3MTMyOTk@._V1_SX300.jpg\"},{\"Title\":\"Sasha + Reid and the Midnight Order\",\"Year\":\"2024\u2013\",\"imdbID\":\"tt29319914\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BNTBhNTc0NWMtOGUyMS00ZDlmLTliYzgtNTQ1YzhjMDMzOTJiXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Order\",\"Year\":\"1973\",\"imdbID\":\"tt0234401\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMDRlZTNmYmEtZDU4ZS00NWQxLTg3MjMtYTUyN2FkOWVkMmFmXkEyXkFqcGdeQXVyMDM0MzU2NA@@._V1_SX300.jpg\"},{\"Title\":\"Restraining + Order\",\"Year\":\"2006\",\"imdbID\":\"tt0482582\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMTIxMTE2MjI5N15BMl5BanBnXkFtZTcwODIwMzE0MQ@@._V1_SX300.jpg\"},{\"Title\":\"New + Order Story\",\"Year\":\"1993\",\"imdbID\":\"tt0137980\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMTgzMTcxNTI0MV5BMl5BanBnXkFtZTcwNTUyMjEzMQ@@._V1_SX300.jpg\"},{\"Title\":\"Fate/Grand + Order: Moonlight/Lostroom\",\"Year\":\"2017\",\"imdbID\":\"tt12589360\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BZWIzZDk3OWMtNTBhZC00MDIwLTllZTctYzQ4YjdhYjZmYjUyXkEyXkFqcGc@._V1_SX300.jpg\"}],\"totalResults\":\"777\",\"Response\":\"True\"}" + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f93ff816f0d0835-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sat, 28 Dec 2024 19:36:14 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '2091' + expires: + - Sat, 28 Dec 2024 20:36:14 GMT + last-modified: + - Sat, 28 Dec 2024 19:36:14 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&page=9&s=order + response: + body: + string: '{"Search":[{"Title":"Agenda Illuminati: Supremacy of the New World + Order","Year":"2016","imdbID":"tt6731810","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BOTk3MTBlNWEtYTg5Ni00YzgxLTgzNzEtN2M2NjZmMzdlNGYzXkEyXkFqcGdeQXVyMTc0ODg5NTQ@._V1_SX300.jpg"},{"Title":"The + Irregular at Magic High: Out of Order","Year":"2014","imdbID":"tt6733216","Type":"game","Poster":"N/A"},{"Title":"Order + of the Dragon","Year":"2018","imdbID":"tt6821968","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BMTkxYmMyM2QtZWExNi00NjYxLTgwZWUtNjdjNDEzMWZmYmRjXkEyXkFqcGdeQXVyMjI1MzI4MjY@._V1_SX300.jpg"},{"Title":"Out + of Order","Year":"1935","imdbID":"tt6947374","Type":"movie","Poster":"N/A"},{"Title":"A + Grilled Cheese Sandwich Order","Year":"2014","imdbID":"tt6269824","Type":"movie","Poster":"N/A"},{"Title":"Order + of the Night Eagles","Year":"2011","imdbID":"tt5826372","Type":"movie","Poster":"N/A"},{"Title":"The + Heretic Order: Rot in Hell","Year":"2016","imdbID":"tt6142144","Type":"movie","Poster":"N/A"},{"Title":"Mi + Familia 2: Class Order Family Tribe","Year":"2016","imdbID":"tt6146356","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BNWViMGJlNmQtYWUxYy00OThmLTg0MmYtZDMyYWY3MTRkNjQ1XkEyXkFqcGdeQXVyMTMwMjE3NDAx._V1_SX300.jpg"},{"Title":"Master + Electronics: The Journey of an Order","Year":"2016","imdbID":"tt6149996","Type":"movie","Poster":"N/A"},{"Title":"New + Order Global Economy","Year":"2001","imdbID":"tt6170656","Type":"movie","Poster":"N/A"}],"totalResults":"777","Response":"True"}' + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f93ffd1bef4242f-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sat, 28 Dec 2024 19:36:27 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '1525' + expires: + - Sat, 28 Dec 2024 20:36:27 GMT + last-modified: + - Sat, 28 Dec 2024 19:36:27 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&page=10&s=order + response: + body: + string: '{"Response":"False","Error":"Request limit reached!"}' + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f93ffd3adb481e5-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Length: + - '53' + Content-Type: + - application/json; charset=utf-8 + Date: + - Sat, 28 Dec 2024 19:36:27 GMT + Server: + - cloudflare + access-control-allow-origin: + - '*' + expires: + - Sat, 28 Dec 2024 20:36:27 GMT + last-modified: + - Sat, 28 Dec 2024 19:36:27 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 401 + message: Unauthorized +version: 1 diff --git a/tests/cassettes/bad_apikey/Band of Brothers.yaml b/tests/cassettes/exceptions/no_results/tt596799.yaml similarity index 65% rename from tests/cassettes/bad_apikey/Band of Brothers.yaml rename to tests/cassettes/exceptions/no_results/tt596799.yaml index a5e4db1..5428193 100644 --- a/tests/cassettes/bad_apikey/Band of Brothers.yaml +++ b/tests/cassettes/exceptions/no_results/tt596799.yaml @@ -11,35 +11,37 @@ interactions: User-Agent: - python-requests/2.32.3 method: GET - uri: https://www.omdbapi.com/?apikey=supersecret&t=Band+of+Brothers + uri: https://www.omdbapi.com/?apikey=supersecret&i=tt596799 response: body: - string: '{"Response":"False","Error":"Invalid API key!"}' + string: '{"Response":"False","Error":"Incorrect IMDb ID."}' headers: Age: - - '265' + - '591' CF-Cache-Status: - HIT CF-RAY: - - 8f8d63cb0f7782e0-IAD + - 8f8f8bd6be48f289-IAD Cache-Control: - public, max-age=86400 Connection: - keep-alive - Content-Length: - - '47' Content-Type: - application/json; charset=utf-8 Date: - - Sat, 28 Dec 2024 00:21:21 GMT + - Sat, 28 Dec 2024 06:38:13 GMT Server: - cloudflare + Transfer-Encoding: + - chunked access-control-allow-origin: - '*' + content-length: + - '49' expires: - - Sat, 28 Dec 2024 01:16:56 GMT + - Sat, 28 Dec 2024 07:28:22 GMT last-modified: - - Sat, 28 Dec 2024 00:16:56 GMT + - Sat, 28 Dec 2024 06:28:22 GMT vary: - '*, Accept-Encoding' x-aspnet-version: @@ -47,6 +49,6 @@ interactions: x-powered-by: - ASP.NET status: - code: 401 - message: Unauthorized + code: 200 + message: OK version: 1 diff --git a/tests/cassettes/movie/Apollo 13.yaml b/tests/cassettes/movie/Apollo 13.yaml new file mode 100644 index 0000000..db605a3 --- /dev/null +++ b/tests/cassettes/movie/Apollo 13.yaml @@ -0,0 +1,59 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&t=Apollo+13&type=movie + response: + body: + string: '{"Title":"Apollo 13","Year":"1995","Rated":"PG","Released":"30 Jun + 1995","Runtime":"140 min","Genre":"Adventure, Drama, History","Director":"Ron + Howard","Writer":"Jim Lovell, Jeffrey Kluger, William Broyles Jr.","Actors":"Tom + Hanks, Bill Paxton, Kevin Bacon","Plot":"NASA must devise a strategy to return + Apollo 13 to Earth safely after the spacecraft undergoes massive internal + damage putting the lives of the three astronauts on board in jeopardy.","Language":"English","Country":"United + States","Awards":"Won 2 Oscars. 31 wins & 59 nominations total","Poster":"https://m.media-amazon.com/images/M/MV5BMGZmNGY1OTAtNjFkYS00MjcyLWFlZjUtYzEyMDllZGZhMzM3XkEyXkFqcGc@._V1_SX300.jpg","Ratings":[{"Source":"Internet + Movie Database","Value":"7.7/10"},{"Source":"Rotten Tomatoes","Value":"96%"},{"Source":"Metacritic","Value":"77/100"}],"Metascore":"77","imdbRating":"7.7","imdbVotes":"321,557","imdbID":"tt0112384","Type":"movie","DVD":"N/A","BoxOffice":"$173,837,933","Production":"N/A","Website":"N/A","Response":"True"}' + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f9eeb1c0f98c98f-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Mon, 30 Dec 2024 03:24:42 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '1016' + expires: + - Mon, 30 Dec 2024 04:24:42 GMT + last-modified: + - Mon, 30 Dec 2024 03:24:42 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/tests/cassettes/movie/tt0190332.yaml b/tests/cassettes/movie/tt0190332.yaml new file mode 100644 index 0000000..1a1b3f2 --- /dev/null +++ b/tests/cassettes/movie/tt0190332.yaml @@ -0,0 +1,60 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&i=tt0190332&type=movie + response: + body: + string: '{"Title":"Crouching Tiger, Hidden Dragon","Year":"2000","Rated":"PG-13","Released":"12 + Jan 2001","Runtime":"120 min","Genre":"Action, Adventure, Drama","Director":"Ang + Lee","Writer":"Hui-Ling Wang, James Schamus, Kuo Jung Tsai","Actors":"Chow + Yun-Fat, Michelle Yeoh, Ziyi Zhang","Plot":"A young Chinese warrior steals + a sword from a famed swordsman and then escapes into a world of romantic adventure + with a mysterious man in the frontier of the nation.","Language":"Mandarin, + Chinese","Country":"Taiwan, Hong Kong, United States, China","Awards":"Won + 4 Oscars. 101 wins & 132 nominations total","Poster":"https://m.media-amazon.com/images/M/MV5BMzRmMTU2OWEtZjI0Ni00MGRhLThjOTItZTJiNmM4MDk0ZWU2XkEyXkFqcGc@._V1_SX300.jpg","Ratings":[{"Source":"Internet + Movie Database","Value":"7.9/10"},{"Source":"Rotten Tomatoes","Value":"98%"},{"Source":"Metacritic","Value":"94/100"}],"Metascore":"94","imdbRating":"7.9","imdbVotes":"285,100","imdbID":"tt0190332","Type":"movie","DVD":"N/A","BoxOffice":"$128,530,421","Production":"N/A","Website":"N/A","Response":"True"}' + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f9ef5c9793e208e-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Mon, 30 Dec 2024 03:31:59 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '1058' + expires: + - Mon, 30 Dec 2024 04:31:59 GMT + last-modified: + - Mon, 30 Dec 2024 03:31:59 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/tests/cassettes/search/movie/malcolm.yaml b/tests/cassettes/search/movie/malcolm.yaml new file mode 100644 index 0000000..bb162e8 --- /dev/null +++ b/tests/cassettes/search/movie/malcolm.yaml @@ -0,0 +1,522 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&page=1&s=malcolm&type=movie + response: + body: + string: '{"Search":[{"Title":"Malcolm X","Year":"1992","imdbID":"tt0104797","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BYTQwYjFhNTMtMjliOC00MGJhLTkwYWMtYjQzZTRiYjRlNjE4XkEyXkFqcGc@._V1_SX300.jpg"},{"Title":"Malcolm + & Marie","Year":"2021","imdbID":"tt12676326","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BZTc5ZDZjMzMtMDk4MC00N2NlLTg2MjAtOGI5OTcxNzZhMGNlXkEyXkFqcGc@._V1_SX300.jpg"},{"Title":"Malcolm","Year":"1986","imdbID":"tt0091464","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BMDIzNDM2YWQtNTU3ZS00NmE1LTk3ZTAtZDVkZjk1ZTI1NzNmXkEyXkFqcGc@._V1_SX300.jpg"},{"Title":"Blood + Brothers: Malcolm X & Muhammad Ali","Year":"2021","imdbID":"tt15095938","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BYzQ1Y2YxYzctYzM3Yy00NTJiLTlkMWYtNmJjYTYwZjEwYWQwXkEyXkFqcGc@._V1_SX300.jpg"},{"Title":"Malcolm + X","Year":"1972","imdbID":"tt0068903","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BMjcyODhlM2YtNzE0OS00MzFiLTg5YzItODJlNDE2MGY5MTE1XkEyXkFqcGc@._V1_SX300.jpg"},{"Title":"O + Lucky Malcolm!","Year":"2006","imdbID":"tt0847187","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BMmE5NzBkODMtYjNlMi00ODIxLTkyZjEtMjRhYWYxNzk4ZDQ5XkEyXkFqcGc@._V1_SX300.jpg"},{"Title":"Little + Malcolm and His Struggle Against the Eunuchs","Year":"1974","imdbID":"tt0071760","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BMzI4YmU5ZTItNzZjMS00YmE1LTk3NDQtMmQxMjY1OTJlNDdjXkEyXkFqcGc@._V1_SX300.jpg"},{"Title":"Volcano: + An Inquiry Into the Life and Death of Malcolm Lowry","Year":"1976","imdbID":"tt0070889","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BNjAyZGFhZGEtZDZkMC00MTY1LTg5ZmItOGQ4YjhjMDlmZWI2XkEyXkFqcGdeQXVyMTM3NzQ5NzQ@._V1_SX300.jpg"},{"Title":"Moving + Malcolm","Year":"2003","imdbID":"tt0368876","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BMTIzODc0MDk3MF5BMl5BanBnXkFtZTcwMjM0NDQyMQ@@._V1_SX300.jpg"},{"Title":"Married + 2 Malcolm","Year":"2000","imdbID":"tt0192912","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BZGQyMjg4YjctN2FiYy00NWIyLTk2MGUtMzY2NTY3Yjc1ZjdlXkEyXkFqcGc@._V1_SX300.jpg"}],"totalResults":"88","Response":"True"}' + headers: + CF-Cache-Status: + - EXPIRED + CF-RAY: + - 8f99eab9bd283b72-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 29 Dec 2024 12:50:37 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '2180' + expires: + - Sun, 29 Dec 2024 13:50:37 GMT + last-modified: + - Sun, 29 Dec 2024 12:50:37 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&page=2&s=malcolm&type=movie + response: + body: + string: '{"Search":[{"Title":"Brother Minister: The Assassination of Malcolm + X","Year":"1994","imdbID":"tt0109339","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BNDA2MTYyNDE4NV5BMl5BanBnXkFtZTcwOTY5ODA3NA@@._V1_SX300.jpg"},{"Title":"Seven + Songs for Malcolm X","Year":"1993","imdbID":"tt0108089","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BMjM1ODQyOTE5OV5BMl5BanBnXkFtZTgwNjY5NzAwODE@._V1_SX300.jpg"},{"Title":"Malcolm + Is a Little Unwell","Year":"2018","imdbID":"tt8995254","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BYTAzMGI2ZDUtZjk1ZS00MmMwLWI5ZGYtNWM5NDUwMjVkY2ZiXkEyXkFqcGdeQXVyNzg5OTk2OA@@._V1_SX300.jpg"},{"Title":"The + Real Malcolm X","Year":"1992","imdbID":"tt0243518","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BMTgwODM1NDAxN15BMl5BanBnXkFtZTcwNzk5NjcxMQ@@._V1_SX300.jpg"},{"Title":"Meet + Mr. Malcolm","Year":"1954","imdbID":"tt0047226","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BZmJmNGRkZGMtOTgxOC00NTg2LWE4YWUtMjY0M2Q1NzM3ZGJiXkEyXkFqcGc@._V1_SX300.jpg"},{"Title":"Call + Me Malcolm","Year":"2005","imdbID":"tt0448998","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BMTYxNjcxNjY5NF5BMl5BanBnXkFtZTcwODQwMjAzMQ@@._V1_SX300.jpg"},{"Title":"Malcolm","Year":"2002","imdbID":"tt0308544","Type":"movie","Poster":"N/A"},{"Title":"By + Any Means Necessary: The Making of ''Malcolm X''","Year":"2005","imdbID":"tt0446960","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BYWE4YjYwM2EtMzFlMi00YWVlLWExNjAtNWYwNDViZmJmYjBiXkEyXkFqcGdeQXVyMTY4MjQ0NzU@._V1_SX300.jpg"},{"Title":"The + Speeches of Malcolm X","Year":"1997","imdbID":"tt0245464","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BMjA3MTU2MDI2MV5BMl5BanBnXkFtZTcwMjYxMjkyMQ@@._V1_SX300.jpg"},{"Title":"Malcolm + McDowell Looks Back","Year":"2011","imdbID":"tt1992176","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BZGYwYjY5NGItNzQ4MS00YzY0LWFiOWItNjljZTExODM0YzJhXkEyXkFqcGdeQXVyNDczMDU5Nw@@._V1_SX300.jpg"}],"totalResults":"88","Response":"True"}' + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f99eabaaa69c946-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 29 Dec 2024 12:50:38 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '2053' + expires: + - Sun, 29 Dec 2024 13:50:38 GMT + last-modified: + - Sun, 29 Dec 2024 12:50:38 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&page=3&s=malcolm&type=movie + response: + body: + string: '{"Search":[{"Title":"Malcolm","Year":"2023","imdbID":"tt26933576","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BY2MyOTAzMGItMjhiOC00NzkwLWJmZTEtNjNhYmQ3ZmU4ODA3XkEyXkFqcGdeQXVyMTI1OTE4NzM5._V1_SX300.jpg"},{"Title":"Malcolm + and Barbara: A Love Story","Year":"1999","imdbID":"tt0354721","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BNzkwZmM4NmQtYzJkYi00MzhjLWEyZGUtYjllZjQxZTVlY2Y0XkEyXkFqcGdeQXVyMTI2MDA5Nw@@._V1_SX300.jpg"},{"Title":"Malcolm + Is Missing","Year":"2022","imdbID":"tt29939618","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BOWJjZjQ4ZjYtMDljZC00YzU4LTg4NDMtYzc0OWY5MzIyMGIzXkEyXkFqcGc@._V1_SX300.jpg"},{"Title":"When + Tariq Ali Met Malcolm X","Year":"2019","imdbID":"tt10927384","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BMzI2MDUyNzUtYjFmYS00NjRkLWIyOTAtY2QxN2E2ZTk2OGI4XkEyXkFqcGdeQXVyMzQ4OTY2ODg@._V1_SX300.jpg"},{"Title":"Malcolm + and Barbara: Love''s Farewell","Year":"2007","imdbID":"tt1124103","Type":"movie","Poster":"N/A"},{"Title":"Malcolm","Year":"2023","imdbID":"tt27250351","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BNDQzMWMwYTAtNzgyZS00NzkxLWI3ZDctOGYwNDU2NTVjYzBhXkEyXkFqcGdeQXVyMTExMTAyNjE2._V1_SX300.jpg"},{"Title":"Hey + Malcolm!","Year":"2026","imdbID":"tt28088038","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BYmQ5MGIwZmEtNDhkYi00MmQxLTk1MGYtNzliODVmZDZiMzgzXkEyXkFqcGc@._V1_SX300.jpg"},{"Title":"The + Metropolitan Opera: X: The Life and Times of Malcolm X","Year":"2023","imdbID":"tt28136654","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BNDc4MjBhZTEtMDYxYi00ZjA4LWJjYTItNWIzMGVjNGU3MzExXkEyXkFqcGdeQXVyMTY3ODkyNDkz._V1_SX300.jpg"},{"Title":"Trident + by Jax Malcolm the Sketch Collection","Year":"2023","imdbID":"tt30062171","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BZTUzZDY1MWItNjM4Mi00YzNiLTg5MWUtMWY2MmYxZTM0ZTYxXkEyXkFqcGdeQXVyMzQwMjc5NTg@._V1_SX300.jpg"},{"Title":"Malcolm + X - Make It Plain On American Experience","Year":"1994","imdbID":"tt32491963","Type":"movie","Poster":"N/A"}],"totalResults":"88","Response":"True"}' + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f99eabc3d2cc56b-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 29 Dec 2024 12:50:38 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '2113' + expires: + - Sun, 29 Dec 2024 13:50:38 GMT + last-modified: + - Sun, 29 Dec 2024 12:50:38 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&page=4&s=malcolm&type=movie + response: + body: + string: '{"Search":[{"Title":"On Any Sunday: Motocross, Malcolm, and More","Year":"2001","imdbID":"tt33833198","Type":"movie","Poster":"N/A"},{"Title":"Uncle + Malcolm and the Witch Next Door","Year":"2007","imdbID":"tt1142989","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BMTc0MzIyNDg0OV5BMl5BanBnXkFtZTcwNTgzMjU1MQ@@._V1_SX300.jpg"},{"Title":"Full + Circle: Malcolm Smith and J.N. Roberts - The Legend Lives On","Year":"2007","imdbID":"tt1554965","Type":"movie","Poster":"N/A"},{"Title":"Malcolm","Year":"2015","imdbID":"tt1785460","Type":"movie","Poster":"N/A"},{"Title":"Life + at the Top: A Week with Prime Minister Malcolm Fraser","Year":"1977","imdbID":"tt1798203","Type":"movie","Poster":"N/A"},{"Title":"The + Life and Times of Malcolm Fraser","Year":"2004","imdbID":"tt1828329","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BMTFkZDljODAtMGZkMC00Zjg0LThmZDYtNjNkZWU3YzAwMjI2XkEyXkFqcGdeQXVyMTMzOTQ0NjA@._V1_SX300.jpg"},{"Title":"Malcolm + Hardee: 25 Years in Showbiz","Year":"1990","imdbID":"tt1946318","Type":"movie","Poster":"N/A"},{"Title":"Malcolm + Ferro, Rept chaser","Year":"2012","imdbID":"tt9141126","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BNGMzN2Q4MTUtZWM0Ny00MjM5LWI2MGUtNTM0ZTU4NTllYzE2XkEyXkFqcGdeQXVyNDUwMDMzMTU@._V1_SX300.jpg"},{"Title":"Malcolm + Ferro, Rept chaser: Secrets","Year":"2014","imdbID":"tt9149872","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BYzdhZDdkZmUtYWI0My00NjI2LTljMWQtN2EzNzViMmU4OTgzXkEyXkFqcGdeQXVyNDUwMDMzMTU@._V1_SX300.jpg"},{"Title":"Some + Call It A Conspiracy: A Malcolm London Story","Year":"2018","imdbID":"tt9403368","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BZDhiMWNlN2ItNzQ5Mi00MmI5LTg5ZmQtYWYyZTQ3ZGRjM2I3XkEyXkFqcGdeQXVyMTQwNzg2MjU@._V1_SX300.jpg"}],"totalResults":"88","Response":"True"}' + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f99eabd8ea3c9a0-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 29 Dec 2024 12:50:38 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '1825' + expires: + - Sun, 29 Dec 2024 13:50:38 GMT + last-modified: + - Sun, 29 Dec 2024 12:50:38 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&page=5&s=malcolm&type=movie + response: + body: + string: "{\"Search\":[{\"Title\":\"Cardigan Homebrew: Hello Malcolm\",\"Year\":\"2018\",\"imdbID\":\"tt9512960\",\"Type\":\"movie\",\"Poster\":\"N/A\"},{\"Title\":\"JD + Lawrence's Martin, Malcolm & Me\",\"Year\":\"2019\",\"imdbID\":\"tt9536664\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BNDU1ZGZlZDItZDhlZC00YmQ5LTk0M2YtODFlY2MzMGMzYTVmXkEyXkFqcGdeQXVyMTkxMTgzNTE@._V1_SX300.jpg\"},{\"Title\":\"Malcolm + Naden: Australia's Most Hunted\",\"Year\":\"2013\",\"imdbID\":\"tt10157568\",\"Type\":\"movie\",\"Poster\":\"N/A\"},{\"Title\":\"Malcolm\",\"Year\":\"2019\",\"imdbID\":\"tt10363908\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BZTNkNjU5MTctMmIxYy00ZDk1LTkxMTYtMzNjNmYyY2ExOTY1XkEyXkFqcGdeQXVyMjQ2NjA1Njg@._V1_SX300.jpg\"},{\"Title\":\"Malcolm: + rencontre avec l'\xE9quipe\",\"Year\":\"2014\",\"imdbID\":\"tt10511042\",\"Type\":\"movie\",\"Poster\":\"N/A\"},{\"Title\":\"Malcolm + (A Visual Poem)\",\"Year\":\"2019\",\"imdbID\":\"tt10871876\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BZjlkOThjNjAtZjU4MS00NTA1LWE4MzMtYzJjMWQ1OTYyMTExXkEyXkFqcGdeQXVyMTA3NDAyMjc3._V1_SX300.jpg\"},{\"Title\":\"Malcolm + Morley: A Studio Visit\",\"Year\":\"2010\",\"imdbID\":\"tt11218092\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BODBhYWI5YTYtY2FhMS00M2VlLTgwMTgtOTAwNzhjMGFlMzhkXkEyXkFqcGdeQXVyNTM3MDMyMDQ@._V1_SX300.jpg\"},{\"Title\":\"Malcolm\",\"Year\":\"2018\",\"imdbID\":\"tt11942240\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BYzA1NDRkZjAtNWY3OS00ZGNhLWI2ZGEtZDE1ZmRjOWU1YzM0XkEyXkFqcGdeQXVyNjU2MzQyMjc@._V1_SX300.jpg\"},{\"Title\":\"Malcolm + McLaren - Not for Sale\",\"Year\":\"2000\",\"imdbID\":\"tt12380180\",\"Type\":\"movie\",\"Poster\":\"N/A\"},{\"Title\":\"Changing + Malcolm\",\"Year\":\"2021\",\"imdbID\":\"tt15131826\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMmJmYmY1ZjUtOGY0My00MzVmLThhMDgtMTI4YjM5ZGE4MjhmXkEyXkFqcGdeQXVyNzc1NjkwODE@._V1_SX300.jpg\"}],\"totalResults\":\"88\",\"Response\":\"True\"}" + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f99eabf5d4e56ec-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 29 Dec 2024 12:50:38 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '1850' + expires: + - Sun, 29 Dec 2024 13:50:38 GMT + last-modified: + - Sun, 29 Dec 2024 12:50:38 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&page=6&s=malcolm&type=movie + response: + body: + string: '{"Search":[{"Title":"132 Malcolm Street","Year":"2017","imdbID":"tt15384572","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BOTAzODAwYjAtMzVkZS00Nzg4LTg4ZGUtMTlmNzdhYmRiZTAxXkEyXkFqcGdeQXVyMTM2NDIwMTk1._V1_SX300.jpg"},{"Title":"A + Tribute to Malcolm X","Year":"1967","imdbID":"tt15943772","Type":"movie","Poster":"N/A"},{"Title":"Malcolm + Revisited","Year":"2020","imdbID":"tt15978364","Type":"movie","Poster":"N/A"},{"Title":"Malcolm + X: By Whatever Means Necessary","Year":"2011","imdbID":"tt16305570","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BYmI0ZTgxOWUtMDY3Ni00MjA2LTg2YzYtYWRiMjAyNTkyMTk3XkEyXkFqcGdeQXVyMTQ2MjE4NzYx._V1_SX300.jpg"},{"Title":"The + Journey of Malcolm Miracle and Dave","Year":"2023","imdbID":"tt25994330","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BN2QwZGI4MGYtYTgzMC00N2MxLTk4OWQtYzM3MjQwM2QzNGYyXkEyXkFqcGc@._V1_SX300.jpg"},{"Title":"The + Autobiography of Malcolm X: As Told to Alex Haley (Audible Original)","Year":"2020","imdbID":"tt12718554","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BNmJjZjY3OTYtNmM2Ny00OGQyLTg0YWItZTRhZDZmMmQ3NzEzXkEyXkFqcGdeQXVyMTIyMzUwNTYx._V1_SX300.jpg"},{"Title":"Malcolm","Year":"2020","imdbID":"tt12739426","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BNjk4YzU5NGQtMjZkNi00OTE5LTliNGUtOWNmNDdkNWFkYThlXkEyXkFqcGdeQXVyNTczNzI3Nzc@._V1_SX300.jpg"},{"Title":"Malcolm...","Year":"2020","imdbID":"tt13106560","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BNTgxODBmNzEtYjdkZS00MjQwLTgwOTEtZmUzZGUyM2UxNjBhXkEyXkFqcGdeQXVyOTIyNTE3MTg@._V1_SX300.jpg"},{"Title":"The + Struggle of Malcolm Young","Year":"2016","imdbID":"tt13774234","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BYmY3ODU3NmYtNDNiOS00ZjYyLTkyOGEtNWZkZTM2OGQzZDY2XkEyXkFqcGdeQXVyNjE1ODc3MTk@._V1_SX300.jpg"},{"Title":"Malcolm + - The Purpose","Year":"2021","imdbID":"tt13891594","Type":"movie","Poster":"N/A"}],"totalResults":"88","Response":"True"}' + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f99eac04a8d6fda-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 29 Dec 2024 12:50:38 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '1986' + expires: + - Sun, 29 Dec 2024 13:50:38 GMT + last-modified: + - Sun, 29 Dec 2024 12:50:38 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&page=7&s=malcolm&type=movie + response: + body: + string: '{"Search":[{"Title":"Who Killed Malcolm Smith?","Year":"1992","imdbID":"tt14164086","Type":"movie","Poster":"N/A"},{"Title":"Malcolm + X: A Shining Black Prince","Year":"2020","imdbID":"tt14245602","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BYzE4MzJhMDktZWRmMC00MTdiLWI1YTQtYzRlZjA1OWU2ZTY5XkEyXkFqcGdeQXVyNzIzNzM1NTE@._V1_SX300.jpg"},{"Title":"Malcolm-Sacred + Games","Year":"2019","imdbID":"tt14809460","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BZjUxZTAzNGItNzFlYy00Mzg4LTkyZDQtNTJjYzY3NDg3Y2FiXkEyXkFqcGdeQXVyMTExODg3MjUz._V1_SX300.jpg"},{"Title":"Malcolm + Lowry en Mexico","Year":"1987","imdbID":"tt0378314","Type":"movie","Poster":"N/A"},{"Title":"Malcolm''s + Echo: The Legacy of Malcolm X","Year":"2008","imdbID":"tt2347488","Type":"movie","Poster":"N/A"},{"Title":"Malcolm''s + Echo: The Legacy of Malcolm X","Year":"2008","imdbID":"tt2348348","Type":"movie","Poster":"N/A"},{"Title":"Malcolm","Year":"2012","imdbID":"tt2405898","Type":"movie","Poster":"N/A"},{"Title":"Malcolm + X: A Day in Smethwick","Year":"2005","imdbID":"tt2485176","Type":"movie","Poster":"N/A"},{"Title":"Malcolm + X: Soldier of Righteousness","Year":"1994","imdbID":"tt2917676","Type":"movie","Poster":"N/A"},{"Title":"Malcolm + Moon","Year":"2013","imdbID":"tt3037170","Type":"movie","Poster":"N/A"}],"totalResults":"88","Response":"True"}' + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f99eac13fec81f4-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 29 Dec 2024 12:50:39 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '1349' + expires: + - Sun, 29 Dec 2024 13:50:39 GMT + last-modified: + - Sun, 29 Dec 2024 12:50:39 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&page=8&s=malcolm&type=movie + response: + body: + string: "{\"Search\":[{\"Title\":\"Eeny Meeny Miney Malcolm\",\"Year\":\"2013\",\"imdbID\":\"tt3500470\",\"Type\":\"movie\",\"Poster\":\"N/A\"},{\"Title\":\"Reconnecting + with Cat People: An Interview with Malcolm McDowell\",\"Year\":\"2014\",\"imdbID\":\"tt3608980\",\"Type\":\"movie\",\"Poster\":\"N/A\"},{\"Title\":\"Malcolm + Lowery\",\"Year\":\"2009\",\"imdbID\":\"tt3826296\",\"Type\":\"movie\",\"Poster\":\"N/A\"},{\"Title\":\"Malcolm + Romero\",\"Year\":\"2014\",\"imdbID\":\"tt4136470\",\"Type\":\"movie\",\"Poster\":\"N/A\"},{\"Title\":\"The + Divine Right of Malcolm Quinn\",\"Year\":\"2014\",\"imdbID\":\"tt4357338\",\"Type\":\"movie\",\"Poster\":\"N/A\"},{\"Title\":\"Martin + Luther King/Malcolm X: deux r\xEAves noirs\",\"Year\":\"2015\",\"imdbID\":\"tt4798994\",\"Type\":\"movie\",\"Poster\":\"N/A\"},{\"Title\":\"Conquering + Beauty: The Life and Music of Malcolm Forsyth\",\"Year\":\"2015\",\"imdbID\":\"tt5487706\",\"Type\":\"movie\",\"Poster\":\"N/A\"},{\"Title\":\"King's + Highway: The Story of Malcolm Fairfield\",\"Year\":\"2016\",\"imdbID\":\"tt5602686\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMzM2YWFkNjgtMGZhMC00MTA4LTkyOWQtNzkwMjNlNGM5Mzk4XkEyXkFqcGdeQXVyNjU5NTA3OTU@._V1_SX300.jpg\"},{\"Title\":\"Libby + and Malcolm\",\"Year\":\"2017\",\"imdbID\":\"tt6258060\",\"Type\":\"movie\",\"Poster\":\"N/A\"},{\"Title\":\"Malcolm + and the Magpies\",\"Year\":\"2017\",\"imdbID\":\"tt6586058\",\"Type\":\"movie\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BNjNjZTE4MWQtNmQ1NS00MTVmLWI3ZWMtNzlmYzQ5M2Y4OGMyXkEyXkFqcGdeQXVyMjY3OTI4Mzk@._V1_SX300.jpg\"}],\"totalResults\":\"88\",\"Response\":\"True\"}" + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f99eac2df20e607-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 29 Dec 2024 12:50:39 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '1422' + expires: + - Sun, 29 Dec 2024 13:50:39 GMT + last-modified: + - Sun, 29 Dec 2024 12:50:39 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&page=9&s=malcolm&type=movie + response: + body: + string: '{"Search":[{"Title":"Malcolm Frager: American Pianist","Year":"2016","imdbID":"tt6742886","Type":"movie","Poster":"N/A"},{"Title":"Malcolm + X: Struggle for Freedom","Year":"1966","imdbID":"tt6777132","Type":"movie","Poster":"N/A"},{"Title":"Hello, + Malcolm","Year":"2016","imdbID":"tt6848776","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BY2RjYjU4MTMtOGQ3ZC00MWZlLTgxZTEtMGFmZGM0NzNjODNlXkEyXkFqcGdeQXVyNDk5MjY4Mzk@._V1_SX300.jpg"},{"Title":"Unburying + Malcolm Miller","Year":"2017","imdbID":"tt6873550","Type":"movie","Poster":"N/A"},{"Title":"Leaving + Malcolm","Year":"2018","imdbID":"tt7141582","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BMWM1M2NhN2YtYTM5OS00NzJhLWI1NzUtNjA1OTNiODM0NGIzXkEyXkFqcGdeQXVyMzA1Mzc5Nzk@._V1_SX300.jpg"},{"Title":"Of + Malcolm","Year":"2017","imdbID":"tt7158644","Type":"movie","Poster":"https://m.media-amazon.com/images/M/MV5BYzg3NGNkOTAtYjc1Ny00NjY0LTg3ZTItNTJjNDY3YWQyMWE0XkEyXkFqcGdeQXVyMjM4MDQ3MjU@._V1_SX300.jpg"},{"Title":"Malcolm","Year":"1983","imdbID":"tt7274122","Type":"movie","Poster":"N/A"},{"Title":"A + day in Life of Joel Malcolm at Halloween HQ","Year":"2017","imdbID":"tt8879834","Type":"movie","Poster":"N/A"}],"totalResults":"88","Response":"True"}' + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f99eac4aff856c8-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 29 Dec 2024 12:50:39 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '1233' + expires: + - Sun, 29 Dec 2024 13:50:39 GMT + last-modified: + - Sun, 29 Dec 2024 12:50:39 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/tests/cassettes/search/series/malcolm.yaml b/tests/cassettes/search/series/malcolm.yaml new file mode 100644 index 0000000..15f2362 --- /dev/null +++ b/tests/cassettes/search/series/malcolm.yaml @@ -0,0 +1,118 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&page=1&s=malcolm&type=series + response: + body: + string: "{\"Search\":[{\"Title\":\"Malcolm in the Middle\",\"Year\":\"2000\u20132006\",\"imdbID\":\"tt0212671\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BY2M0Y2M4YTQtZDdjMC00MDZiLWI1OGEtZDdjZjBiZDE4ODU3XkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Who + Killed Malcolm X?\",\"Year\":\"2019\u20132020\",\"imdbID\":\"tt10948316\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BZTc0YjU0M2EtZjE1Ni00NTNjLTgyNGEtZTYxZjNjN2M1ZDdiXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Malcolm + & Eddie\",\"Year\":\"1996\u20132000\",\"imdbID\":\"tt0115259\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BNGFiNmJjMjItMDIwMi00MmI2LWJjMDYtMjU2ODk0MDU4MTkwXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Mrs + Merton & Malcolm\",\"Year\":\"1999\",\"imdbID\":\"tt0180373\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMzkyZDZiODktNmVlNC00YzJlLTkzNzItYTBkODZlN2E0MGRjXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Malcolm + and the Magpies\",\"Year\":\"2020\u2013\",\"imdbID\":\"tt12229610\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BZDQxYmVmMjktOTRlOC00MzU2LWExYTktNTRhMmEyZDNjOWE2XkEyXkFqcGdeQXVyNTY2Mzg2NA@@._V1_SX300.jpg\"},{\"Title\":\"The + Lost Tapes: Malcolm X\",\"Year\":\"2018\",\"imdbID\":\"tt7908780\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BYWQ2ZDkxZjItYzA2My00NmYwLTk0MTUtYmVlM2I5ODM4YTU1XkEyXkFqcGdeQXVyNzI1MjcwMg@@._V1_SX300.jpg\"},{\"Title\":\"Walkabout + with Malcolm Douglas\",\"Year\":\"1969\u20132001\",\"imdbID\":\"tt7901730\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BZTI0NjBiZTItOTU3Yy00ZjIzLWE1NjgtOGJhOGY0MjAxN2JjXkEyXkFqcGc@._V1_SX300.jpg\"},{\"Title\":\"Making + Malcolm\",\"Year\":\"2019\u2013\",\"imdbID\":\"tt10355426\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BYjI0YTMzYTEtNTFiNi00Zjg0LTkwNjQtZGI1MjY2M2M1ZTI1XkEyXkFqcGdeQXVyNjcwNDU4NjI@._V1_SX300.jpg\"},{\"Title\":\"Malcolm + Douglas in the Bush\",\"Year\":\"2009\",\"imdbID\":\"tt11346518\",\"Type\":\"series\",\"Poster\":\"N/A\"},{\"Title\":\"Malcolm + Muggeridge Meets Australians\",\"Year\":\"1958\u2013\",\"imdbID\":\"tt5018454\",\"Type\":\"series\",\"Poster\":\"N/A\"}],\"totalResults\":\"18\",\"Response\":\"True\"}" + headers: + CF-Cache-Status: + - EXPIRED + CF-RAY: + - 8f99eac68f175790-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 29 Dec 2024 12:50:39 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '2049' + expires: + - Sun, 29 Dec 2024 13:50:39 GMT + last-modified: + - Sun, 29 Dec 2024 12:50:39 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&page=2&s=malcolm&type=series + response: + body: + string: "{\"Search\":[{\"Title\":\"Malcolm and the Martians\",\"Year\":\"2016\u2013\",\"imdbID\":\"tt5349088\",\"Type\":\"series\",\"Poster\":\"N/A\"},{\"Title\":\"Malcolm + & James\",\"Year\":\"2021\u2013\",\"imdbID\":\"tt15367926\",\"Type\":\"series\",\"Poster\":\"N/A\"},{\"Title\":\"Chasing + Malcolm\",\"Year\":\"2021\u2013\",\"imdbID\":\"tt15415714\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BNWQ4OTkxYWMtOGJhNS00YmEwLWI2NGItZTNlN2NhMDg1MWQ4XkEyXkFqcGdeQXVyNzc1NjkwODE@._V1_SX300.jpg\"},{\"Title\":\"Catching + Malcolm\",\"Year\":\"2022\u2013\",\"imdbID\":\"tt17163972\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BNWY3N2MyYTYtZTRkNS00OGVlLTg1NGYtOGJhNDJiYWZkZWU1XkEyXkFqcGdeQXVyNzc1NjkwODE@._V1_SX300.jpg\"},{\"Title\":\"Confessing + Malcolm\",\"Year\":\"2022\u2013\",\"imdbID\":\"tt19393922\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BYzYzNTQyMWEtNGQ2OC00N2Q0LWIxNTEtYjg5ZGM2NjE0NGY0XkEyXkFqcGdeQXVyNzc1NjkwODE@._V1_SX300.jpg\"},{\"Title\":\"Creating + Malcolm\",\"Year\":\"2022\u2013\",\"imdbID\":\"tt21980380\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BNjgyZTY3ZWQtNmQwNC00ZTlhLWFiNzYtNGZhMjEwY2NkNzg5XkEyXkFqcGdeQXVyNzc1NjkwODE@._V1_SX300.jpg\"},{\"Title\":\"Malcolm + - Part 1\",\"Year\":\"2022\u2013\",\"imdbID\":\"tt26229436\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BMGJkOGNhYWMtYzMyZi00NjRjLWI3YWMtM2Y2NGJhYmNlZWNkXkEyXkFqcGdeQXVyMTM0OTQ3NDIx._V1_SX300.jpg\"},{\"Title\":\"Malcolm + Guite\",\"Year\":\"2020\u2013\",\"imdbID\":\"tt31779422\",\"Type\":\"series\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BZGZjODk2N2EtOTJiMS00YzE3LWEyZDctMmU1MGQ1ZWQ0M2VjXkEyXkFqcGdeQXVyMDY3OTcyOQ@@._V1_SX300.jpg\"}],\"totalResults\":\"18\",\"Response\":\"True\"}" + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f99eac77e31c56e-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Sun, 29 Dec 2024 12:50:40 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '1608' + expires: + - Sun, 29 Dec 2024 13:50:40 GMT + last-modified: + - Sun, 29 Dec 2024 12:50:40 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/tests/cassettes/series/Battlestar Galactica.yaml b/tests/cassettes/series/Battlestar Galactica.yaml new file mode 100644 index 0000000..43c9d38 --- /dev/null +++ b/tests/cassettes/series/Battlestar Galactica.yaml @@ -0,0 +1,59 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.3 + method: GET + uri: https://www.omdbapi.com/?apikey=supersecret&t=Battlestar+Galactica&type=series + response: + body: + string: "{\"Title\":\"Battlestar Galactica\",\"Year\":\"2004\u20132009\",\"Rated\":\"TV-14\",\"Released\":\"14 + Jan 2005\",\"Runtime\":\"44 min\",\"Genre\":\"Action, Adventure, Drama\",\"Director\":\"N/A\",\"Writer\":\"Glen + A. Larson, Ronald D. Moore\",\"Actors\":\"Edward James Olmos, Mary McDonnell, + Jamie Bamber\",\"Plot\":\"When an old enemy, the Cylons, resurface and obliterate + the 12 colonies, the crew of the aged Galactica protect a small civilian fleet + - the last of humanity - as they journey toward the fabled 13th colony, Earth.\",\"Language\":\"English\",\"Country\":\"United + States\",\"Awards\":\"Won 3 Primetime Emmys. 43 wins & 114 nominations total\",\"Poster\":\"https://m.media-amazon.com/images/M/MV5BNmMzYzdmNWMtM2ZmMi00Y2E2LWI5ZTMtYWJlNmJiMDgyYWRiXkEyXkFqcGc@._V1_SX300.jpg\",\"Ratings\":[{\"Source\":\"Internet + Movie Database\",\"Value\":\"8.7/10\"}],\"Metascore\":\"N/A\",\"imdbRating\":\"8.7\",\"imdbVotes\":\"179,376\",\"imdbID\":\"tt0407362\",\"Type\":\"series\",\"totalSeasons\":\"4\",\"Response\":\"True\"}" + headers: + CF-Cache-Status: + - MISS + CF-RAY: + - 8f9ed65a5de8d6e1-IAD + Cache-Control: + - public, max-age=86400 + Connection: + - keep-alive + Content-Type: + - application/json; charset=utf-8 + Date: + - Mon, 30 Dec 2024 03:10:32 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + access-control-allow-origin: + - '*' + content-length: + - '929' + expires: + - Mon, 30 Dec 2024 04:10:32 GMT + last-modified: + - Mon, 30 Dec 2024 03:10:32 GMT + vary: + - '*, Accept-Encoding' + x-aspnet-version: + - 4.0.30319 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/tests/test_omdb.py b/tests/test_omdb.py index 33c8817..0a344b9 100644 --- a/tests/test_omdb.py +++ b/tests/test_omdb.py @@ -2,16 +2,20 @@ Unittest class """ +import os import unittest import requests +from dotenv import load_dotenv from vcr import VCR # type: ignore from omdb import OMDB -from omdb.exceptions import OMDBException, OMDBInvalidAPIKey, OMDBNoResults, OMDBTooManyResults +from omdb.exceptions import OMDBException, OMDBInvalidAPIKey, OMDBLimitReached, OMDBNoResults, OMDBTooManyResults + +load_dotenv() BUILD_TEST_DATA = False -API_KEY = "supersecret" +API_KEY = "superscret" if not BUILD_TEST_DATA else os.getenv("OMDB_API_KEY", "supersecret") RECORD_MODE = "new_episodes" if BUILD_TEST_DATA else "none" @@ -27,27 +31,27 @@ def __init__(self, api_key, timeout=5, strict=True): path_transformer=VCR.ensure_suffix(".yaml"), ) - def _format_results(self, res, params) -> str: - return super()._format_results(res, params) - def _build_path(self, kwargs): + if "s" in kwargs: + if "type" in kwargs and kwargs["type"] == "series": + return f"search/series/{kwargs['s']}" + if "type" in kwargs and kwargs["type"] == "movie": + return f"search/movie/{kwargs['s']}" + return f"search/{kwargs['s']}" + + val = kwargs["t"] if "t" in kwargs else kwargs["i"] if kwargs["apikey"] == "123456": - val = kwargs["t"] if "t" in kwargs else kwargs["i"] return f"exceptions/bad_api_key/{val}" if "t" in kwargs and kwargs["t"] == "Random Movie Title": - val = kwargs["t"] if "t" in kwargs else kwargs["i"] return f"exceptions/no_results/{val}" if "type" in kwargs and kwargs["type"] == "series": - return f"series/{kwargs['t']}" + return f"series/{val}" if "type" in kwargs and kwargs["type"] == "movie": - return f"movie/{kwargs['t']}" + return f"movie/{val}" if "type" in kwargs and kwargs["type"] == "episode": if "Episode" in kwargs: - return f"episode/{kwargs['t']}/episode-{kwargs['Episode']}" - return f"episodes/{kwargs['t']}" - if "s" in kwargs: - return f"search/{kwargs['s']}" - print(kwargs) + return f"episode/{val}/episode-{kwargs['Episode']}" + return f"episodes/{val}" return str(kwargs) @@ -174,6 +178,36 @@ def tmp_build_path(kwargs): else: self.assertEqual(True, False) + def test_something(self): + def tmp_build_path(kwargs): + return f"exceptions/no_results/{kwargs['i']}" + + omdb = OMDBOverloaded(api_key=API_KEY) + omdb._build_path = tmp_build_path + + self.assertRaises(OMDBNoResults, lambda: omdb.get(imdbid="tt596799")) + + try: + omdb.get(imdbid="tt596799") + except OMDBNoResults as ex: + self.assertEqual(ex.error, "Incorrect IMDb ID.") + else: + self.assertEqual(True, False) + + def test_limit_reached_error(self): + def tmp_build_path(kwargs): + return f"exceptions/limit_reached/{kwargs['s']}" + + omdb = OMDBOverloaded(api_key=API_KEY) + omdb._build_path = tmp_build_path + + self.assertRaises(OMDBLimitReached, lambda: omdb.search("order")) + try: + omdb.search("order") + except OMDBLimitReached as ex: + self.assertEqual(ex.api_key, API_KEY) + self.assertEqual(ex.message, f"Limit reached for API Key: {omdb.api_key}") + class TestOMDBGet(unittest.TestCase): def tmp_build_path(_, kwargs): @@ -223,6 +257,28 @@ def test_search_less_than_10(self): self.assertLessEqual(int(res["total_results"]), 10) self.assertEqual(res["total_results"], "3") + def test_search_series(self): + omdb = OMDBOverloaded(api_key=API_KEY) + res = omdb.search_series("malcolm") + + self.assertTrue("Malcolm in the Middle" in [x["title"] for x in res["search"]]) + self.assertEqual(res["total_results"], "18") + self.assertEqual(len(res["search"]), 18) + + def test_search_movie(self): + omdb = OMDBOverloaded(api_key=API_KEY) + res = omdb.search_movie("malcolm") + + # get a specific movie + movie = {} + for m in res["search"]: + if m["title"] == "Malcolm" and m["year"] == "1986": + movie = m + self.assertEqual(res["total_results"], "88") + self.assertEqual(len(res["search"]), 88) + self.assertTrue(movie) + self.assertEqual(movie["imdb_id"], "tt0091464") + class TestOMDBSeries(unittest.TestCase): def test_series(self): @@ -240,16 +296,51 @@ def test_series(self): self.assertEqual(got["year"], "2011-2019") self.assertEqual(got["total_seasons"], "8") + def test_get_series_pull_episodes(self): + omdb = OMDBOverloaded(api_key=API_KEY) + bsg = omdb.get_series(title="Battlestar Galactica", pull_episodes=True) + + self.assertEqual(bsg["total_seasons"], "4") + for i in range(1, 5): + season = bsg["seasons"][i] + self.assertEqual(season["episodes"][0]["episode"], "1") + class TestOMDBEpisodes(unittest.TestCase): def test_episodes(self): omdb = OMDBOverloaded(api_key=API_KEY) - omdb.get_episodes(title="Band of Brothers", season=1) + res = omdb.get_episodes(title="Band of Brothers", season=1) + self.assertEqual(res["total_seasons"], "1") + self.assertEqual(len(res["episodes"]), 10) + + res = omdb.get_episodes(title="Psych", season=3) + self.assertEqual(res["total_seasons"], "8") + self.assertEqual(len(res["episodes"]), 16) def test_specific_episode(self): omdb = OMDBOverloaded(api_key=API_KEY) - omdb.get_episode(title="Band of Brothers", season=1, episode=5) + res = omdb.get_episode(title="Band of Brothers", season=1, episode=5) + self.assertEqual(res["title"], "Crossroads") + self.assertEqual(res["year"], "2001") + + res = omdb.get_episode(title="Psych", season=3, episode=10) + self.assertEqual(res["title"], "Six Feet Under the Sea") + self.assertEqual(res["year"], "2009") class TestOMDBMovies(unittest.TestCase): - pass + def test_get_movie(self): + omdb = OMDBOverloaded(api_key=API_KEY) + mov = omdb.get_movie(title="Apollo 13") + self.assertEqual(mov["year"], "1995") + self.assertEqual(mov["director"], "Ron Howard") + self.assertEqual(mov["runtime"], "140 min") + self.assertEqual(mov["imdb_id"], "tt0112384") + + def test_get_movie_imdb_id(self): + omdb = OMDBOverloaded(api_key=API_KEY) + mov = omdb.get_movie(imdbid="tt0190332") + self.assertEqual(mov["year"], "2000") + self.assertEqual(mov["director"], "Ang Lee") + self.assertEqual(mov["runtime"], "120 min") + self.assertEqual(mov["title"], "Crouching Tiger, Hidden Dragon")