diff --git a/pyproject.toml b/pyproject.toml index 9d1d1e2..adc6f48 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "phylm" -version = "6.1.2" +version = "6.1.3" description = "Phylm" authors = ["Dom Batten "] license = "MIT" diff --git a/src/phylm/clients/tmdb.py b/src/phylm/clients/tmdb.py index 58eabfe..fecbf93 100644 --- a/src/phylm/clients/tmdb.py +++ b/src/phylm/clients/tmdb.py @@ -68,7 +68,7 @@ def search_movies( return results async def search_movies_async( - self, query: str, region: str = "us", year: Optional[int] = None + self, query: str, region: Optional[str] = None, year: Optional[int] = None ) -> List[Dict[str, Any]]: """Search for movies async. @@ -91,10 +91,12 @@ async def search_movies_async( "language": "en-US", "query": query, "include_adult": "false", - "region": region.upper(), "page": 1, } + if region: + params["region"] = region + if year: params["year"] = year diff --git a/tests/fixtures/vcr_cassettes/clients/tmdb/search_no_results.yaml b/tests/fixtures/vcr_cassettes/clients/tmdb/search_no_results.yaml index 98c0b84..2931848 100644 --- a/tests/fixtures/vcr_cassettes/clients/tmdb/search_no_results.yaml +++ b/tests/fixtures/vcr_cassettes/clients/tmdb/search_no_results.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.themoviedb.org/3/search/movie?include_adult=false&language=en-US&page=1&query=askdjhashdaskdasljd®ion=US + uri: https://api.themoviedb.org/3/search/movie?include_adult=false&language=en-US&page=1&query=askdjhashdaskdasljd response: body: string: '{"page":1,"results":[],"total_pages":0,"total_results":0}' diff --git a/tests/fixtures/vcr_cassettes/clients/tmdb/the_matrix_year_async.yaml b/tests/fixtures/vcr_cassettes/clients/tmdb/the_matrix_year_async.yaml index da1a4d6..7f22db6 100644 --- a/tests/fixtures/vcr_cassettes/clients/tmdb/the_matrix_year_async.yaml +++ b/tests/fixtures/vcr_cassettes/clients/tmdb/the_matrix_year_async.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.themoviedb.org/3/search/movie?include_adult=false&language=en-US&page=1&query=The+Matrix®ion=US&year=1999 + uri: https://api.themoviedb.org/3/search/movie?include_adult=false&language=en-US&page=1&query=The+Matrix&year=1999 response: body: string: diff --git a/tests/fixtures/vcr_cassettes/tmdb/no_results.yaml b/tests/fixtures/vcr_cassettes/tmdb/no_results.yaml index ddea9d3..9c190f2 100644 --- a/tests/fixtures/vcr_cassettes/tmdb/no_results.yaml +++ b/tests/fixtures/vcr_cassettes/tmdb/no_results.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.themoviedb.org/3/search/movie?api_key=9017d5457c4e8ec5f0999d1b10012ae1&language=en-US&query=asldkjnkasnxlajsnxkasjxnas&include_adult=false®ion=US&page=1 + uri: https://api.themoviedb.org/3/search/movie?api_key=9017d5457c4e8ec5f0999d1b10012ae1&language=en-US&query=asldkjnkasnxlajsnxkasjxnas&include_adult=false&page=1 response: body: string: '{"page":1,"results":[],"total_pages":0,"total_results":0}' diff --git a/tests/fixtures/vcr_cassettes/tmdb/the_matrix.yaml b/tests/fixtures/vcr_cassettes/tmdb/the_matrix.yaml index 5690104..7e4cd2a 100644 --- a/tests/fixtures/vcr_cassettes/tmdb/the_matrix.yaml +++ b/tests/fixtures/vcr_cassettes/tmdb/the_matrix.yaml @@ -3,18 +3,18 @@ interactions: body: null headers: {} method: GET - uri: https://api.themoviedb.org/3/search/movie?api_key=9017d5457c4e8ec5f0999d1b10012ae1&language=en-US&query=The+Matrix&include_adult=false®ion=US&page=1 + uri: https://api.themoviedb.org/3/search/movie?api_key=9017d5457c4e8ec5f0999d1b10012ae1&language=en-US&query=The+Matrix&include_adult=false&page=1 response: body: string: "{\"page\":1,\"results\":[{\"adult\":false,\"backdrop_path\":\"/waCRuAW5ocONRehP556vPexVXA9.jpg\",\"genre_ids\":[28,878],\"id\":603,\"original_language\":\"en\",\"original_title\":\"The Matrix\",\"overview\":\"Set in the 22nd century, The Matrix tells the story of a computer hacker who joins a group of underground insurgents fighting - the vast and powerful computers who now rule the earth.\",\"popularity\":77.213,\"poster_path\":\"/f89U3ADr1oiB1s9GkdPOEpXUk5H.jpg\",\"release_date\":\"1999-03-30\",\"title\":\"The - Matrix\",\"video\":false,\"vote_average\":8.2,\"vote_count\":22741},{\"adult\":false,\"backdrop_path\":\"/eNI7PtK6DEYgZmHWP9gQNuff8pv.jpg\",\"genre_ids\":[878,28,12],\"id\":624860,\"original_language\":\"en\",\"original_title\":\"The + the vast and powerful computers who now rule the earth.\",\"popularity\":103.28,\"poster_path\":\"/f89U3ADr1oiB1s9GkdPOEpXUk5H.jpg\",\"release_date\":\"1999-03-30\",\"title\":\"The + Matrix\",\"video\":false,\"vote_average\":8.2,\"vote_count\":22819},{\"adult\":false,\"backdrop_path\":\"/eNI7PtK6DEYgZmHWP9gQNuff8pv.jpg\",\"genre_ids\":[878,28,12],\"id\":624860,\"original_language\":\"en\",\"original_title\":\"The Matrix Resurrections\",\"overview\":\"Plagued by strange memories, Neo's life - takes an unexpected turn when he finds himself back inside the Matrix.\",\"popularity\":104.234,\"poster_path\":\"/8c4a8kE7PizaGQQnditMmI1xbRp.jpg\",\"release_date\":\"2021-12-22\",\"title\":\"The - Matrix Resurrections\",\"video\":false,\"vote_average\":6.6,\"vote_count\":4516},{\"adult\":false,\"backdrop_path\":\"/pxK1iK6anS6erGg4QePmMKbB1E7.jpg\",\"genre_ids\":[12,28,53,878],\"id\":604,\"original_language\":\"en\",\"original_title\":\"The + takes an unexpected turn when he finds himself back inside the Matrix.\",\"popularity\":123.018,\"poster_path\":\"/8c4a8kE7PizaGQQnditMmI1xbRp.jpg\",\"release_date\":\"2021-12-16\",\"title\":\"The + Matrix Resurrections\",\"video\":false,\"vote_average\":6.5,\"vote_count\":4548},{\"adult\":false,\"backdrop_path\":\"/pxK1iK6anS6erGg4QePmMKbB1E7.jpg\",\"genre_ids\":[12,28,53,878],\"id\":604,\"original_language\":\"en\",\"original_title\":\"The Matrix Reloaded\",\"overview\":\"Six months after the events depicted in The Matrix, Neo has proved to be a good omen for the free humans, as more and more humans are being freed from the matrix and brought to Zion, the one and @@ -27,55 +27,50 @@ interactions: them reach the Source. Meanwhile Neo's recurrent dreams depicting Trinity's death have got him worried and as if it was not enough, Agent Smith has somehow escaped deletion, has become more powerful than before and has fixed Neo as - his next target.\",\"popularity\":35.264,\"poster_path\":\"/9TGHDvWrqKBzwDxDodHYXEmOE6J.jpg\",\"release_date\":\"2003-05-15\",\"title\":\"The - Matrix Reloaded\",\"video\":false,\"vote_average\":7,\"vote_count\":9600},{\"adult\":false,\"backdrop_path\":\"/533xAMhhVyjTy8hwMUFEt5TuDfR.jpg\",\"genre_ids\":[12,28,53,878],\"id\":605,\"original_language\":\"en\",\"original_title\":\"The + his next target.\",\"popularity\":42.386,\"poster_path\":\"/9TGHDvWrqKBzwDxDodHYXEmOE6J.jpg\",\"release_date\":\"2003-05-15\",\"title\":\"The + Matrix Reloaded\",\"video\":false,\"vote_average\":7.028,\"vote_count\":9633},{\"adult\":false,\"backdrop_path\":\"/533xAMhhVyjTy8hwMUFEt5TuDfR.jpg\",\"genre_ids\":[12,28,53,878],\"id\":605,\"original_language\":\"en\",\"original_title\":\"The Matrix Revolutions\",\"overview\":\"The human city of Zion defends itself against the massive invasion of the machines as Neo fights to end the war - at another front while also opposing the rogue Agent Smith.\",\"popularity\":32.731,\"poster_path\":\"/ynMQ4nVwkoP2gLxXXDgcdltihTD.jpg\",\"release_date\":\"2003-11-05\",\"title\":\"The - Matrix Revolutions\",\"video\":false,\"vote_average\":6.7,\"vote_count\":8631},{\"adult\":false,\"backdrop_path\":\"/lBdXACywnLwKUZmZkZ87djDQBeV.jpg\",\"genre_ids\":[99],\"id\":14543,\"original_language\":\"en\",\"original_title\":\"The + at another front while also opposing the rogue Agent Smith.\",\"popularity\":40.471,\"poster_path\":\"/ynMQ4nVwkoP2gLxXXDgcdltihTD.jpg\",\"release_date\":\"2003-11-05\",\"title\":\"The + Matrix Revolutions\",\"video\":false,\"vote_average\":6.7,\"vote_count\":8660},{\"adult\":false,\"backdrop_path\":\"/lBdXACywnLwKUZmZkZ87djDQBeV.jpg\",\"genre_ids\":[99],\"id\":14543,\"original_language\":\"en\",\"original_title\":\"The Matrix Revisited\",\"overview\":\"The film goes behind the scenes of the 1999 - sci-fi movie The Matrix.\",\"popularity\":10.63,\"poster_path\":\"/8yxSztoc5sqZiGuKcFuVOh65B6Y.jpg\",\"release_date\":\"2001-11-20\",\"title\":\"The + sci-fi movie The Matrix.\",\"popularity\":12.361,\"poster_path\":\"/8yxSztoc5sqZiGuKcFuVOh65B6Y.jpg\",\"release_date\":\"2001-11-19\",\"title\":\"The Matrix Revisited\",\"video\":false,\"vote_average\":6.9,\"vote_count\":169},{\"adult\":false,\"backdrop_path\":\"/5nxDn3mrdmeUHJOZi1Wfqya8Vji.jpg\",\"genre_ids\":[99],\"id\":696109,\"original_language\":\"en\",\"original_title\":\"A Glitch in the Matrix\",\"overview\":\"Are we in fact living in a simulation? This is the question postulated, wrestled with, and ultimately argued for through archival footage, compelling interviews with real people shrouded in digital avatars, and a collection of cases from some of our most iconoclastic - figures in contemporary culture.\",\"popularity\":7.989,\"poster_path\":\"/bn0BLVadmvzq6MmJ0n97MLxGpNQ.jpg\",\"release_date\":\"2021-02-05\",\"title\":\"A + figures in contemporary culture.\",\"popularity\":5.453,\"poster_path\":\"/bn0BLVadmvzq6MmJ0n97MLxGpNQ.jpg\",\"release_date\":\"2021-02-05\",\"title\":\"A Glitch in the Matrix\",\"video\":false,\"vote_average\":5.2,\"vote_count\":28},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[99,878],\"id\":221495,\"original_language\":\"en\",\"original_title\":\"The Matrix Recalibrated\",\"overview\":\"The making of Matrix Revolutions, The (2003) is briefly touched on here in this documentary. Interviews with various cast and crew members inform us how they were affected by the deaths of Gloria Foster and Aaliyah, and also delve into the making of the visual effects that - takes up a lot of screen time. Written by Rhyl Donnelly\",\"popularity\":4.1,\"poster_path\":\"/gRni1Q651AZPnLqZczmahiIxG0s.jpg\",\"release_date\":\"2004-04-06\",\"title\":\"The + takes up a lot of screen time. Written by Rhyl Donnelly\",\"popularity\":5.454,\"poster_path\":\"/gRni1Q651AZPnLqZczmahiIxG0s.jpg\",\"release_date\":\"2004-04-06\",\"title\":\"The Matrix Recalibrated\",\"video\":true,\"vote_average\":6.7,\"vote_count\":37},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[99],\"id\":591955,\"original_language\":\"en\",\"original_title\":\"The Matrix Reloaded Revisited\",\"overview\":\"The making of The Matrix Reloaded: \ Go to the middle movie's furthest reaches via five documentary paths revealing - 21 featurettes.\",\"popularity\":3.031,\"poster_path\":\"/gb7C4oRzYWXWCuZMR1cwtHa53Pz.jpg\",\"release_date\":\"2004-12-07\",\"title\":\"The - Matrix Reloaded Revisited\",\"video\":false,\"vote_average\":7.4,\"vote_count\":16},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[99],\"id\":684731,\"original_language\":\"en\",\"original_title\":\"The + 21 featurettes.\",\"popularity\":4.304,\"poster_path\":\"/gb7C4oRzYWXWCuZMR1cwtHa53Pz.jpg\",\"release_date\":\"2004-12-07\",\"title\":\"The + Matrix Reloaded Revisited\",\"video\":true,\"vote_average\":7.4,\"vote_count\":16},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[99,28,878],\"id\":684428,\"original_language\":\"en\",\"original_title\":\"The + Matrix: What Is Bullet-Time?\",\"overview\":\"Special Effects wizard John + Gaeta demonstrates how the \\\"Bullet-Time\\\" effects were created for the + film Matrix, The (1999).\",\"popularity\":3.175,\"poster_path\":\"/hSTervHaROcTd8Ir3DPfepN80dL.jpg\",\"release_date\":\"1999-09-21\",\"title\":\"The + Matrix: What Is Bullet-Time?\",\"video\":false,\"vote_average\":6.6,\"vote_count\":7},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[99],\"id\":684731,\"original_language\":\"en\",\"original_title\":\"The Matrix Reloaded: Pre-Load\",\"overview\":\"This making-of piece offers the standard mix of movie snippets, behind the scenes materials, and interviews - from cast and crew on the making of the film.\",\"popularity\":3.03,\"poster_path\":null,\"release_date\":\"2003-10-14\",\"title\":\"The - Matrix Reloaded: Pre-Load\",\"video\":false,\"vote_average\":6.3,\"vote_count\":15},{\"adult\":false,\"backdrop_path\":\"/b3toMttpZ0cFeYMgLeL042uJJpi.jpg\",\"genre_ids\":[99,28,878],\"id\":684735,\"original_language\":\"en\",\"original_title\":\"Making - 'Enter the Matrix'\",\"overview\":\"A look at Enter the Matrix: The game's - story picks up just before The Matrix Reloaded and runs parallel to that of - the film. Bend the rules of the Matrix with martial arts, pilot the fastest - hovercraft in the fleet, or just fight with lots of guns.\",\"popularity\":1.683,\"poster_path\":\"/zQbJkJkzpB8EthEJ3r2Y6A2kkP6.jpg\",\"release_date\":\"2003-10-14\",\"title\":\"Making - 'Enter the Matrix'\",\"video\":false,\"vote_average\":5.8,\"vote_count\":6},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[99],\"id\":684431,\"original_language\":\"en\",\"original_title\":\"Making - 'The Matrix'\",\"overview\":\"A promotional making-of documentary for the - film Matrix, The (1999) that devotes its time to explaining the digital and - practical effects contained in the film. This is very interesting, seeing - as how they're giving away the cinematic secrets that they created solely - for the this movie, that have now been spoofed and referenced in countless - other films.\",\"popularity\":1.294,\"poster_path\":\"/m2yIfRJYwpCgHON1Ig1pNKMWTxp.jpg\",\"release_date\":\"1999-09-21\",\"title\":\"Making - 'The Matrix'\",\"video\":false,\"vote_average\":7.8,\"vote_count\":12},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[99],\"id\":503880,\"original_language\":\"en\",\"original_title\":\"The + from cast and crew on the making of the film.\",\"popularity\":3.615,\"poster_path\":null,\"release_date\":\"2003-10-14\",\"title\":\"The + Matrix Reloaded: Pre-Load\",\"video\":false,\"vote_average\":6.3,\"vote_count\":15},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[99],\"id\":503880,\"original_language\":\"en\",\"original_title\":\"The Matrix Revolutions Revisited\",\"overview\":\"The making of The Matrix Revolutions: \ The cataclysmic final confrontation chronicled through six documentary pods - revealing 28 featurettes\",\"popularity\":2.179,\"poster_path\":\"/61ASnmqvzpuz9VEfFElo3e2nIft.jpg\",\"release_date\":\"2004-12-07\",\"title\":\"The - Matrix Revolutions Revisited\",\"video\":false,\"vote_average\":7.8,\"vote_count\":13},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[99,28,878],\"id\":684428,\"original_language\":\"en\",\"original_title\":\"The - Matrix: What Is Bullet-Time?\",\"overview\":\"Special Effects wizard John - Gaeta demonstrates how the \\\"Bullet-Time\\\" effects were created for the - film Matrix, The (1999).\",\"popularity\":2.171,\"poster_path\":\"/hSTervHaROcTd8Ir3DPfepN80dL.jpg\",\"release_date\":\"1999-09-21\",\"title\":\"The - Matrix: What Is Bullet-Time?\",\"video\":false,\"vote_average\":6.6,\"vote_count\":7},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[99,28,878],\"id\":684729,\"original_language\":\"en\",\"original_title\":\"The + revealing 28 featurettes\",\"popularity\":1.597,\"poster_path\":\"/61ASnmqvzpuz9VEfFElo3e2nIft.jpg\",\"release_date\":\"2004-12-07\",\"title\":\"The + Matrix Revolutions Revisited\",\"video\":true,\"vote_average\":7.8,\"vote_count\":13},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[99],\"id\":26214,\"original_language\":\"en\",\"original_title\":\"The + American Matrix - Age Of Deception\",\"overview\":\"A shocking new 2 hour + film by B.A. Brooks. This 2010 release is a follow up to \\\"The Decline And + Fall Of America\\\" which was released in 2008. \\\"The American Matrix - + Age Of Deception\\\" details news items that all people should be aware of + such as the economic collapse of The United States and the formation of the + a New World Order. See what has really been going on in America today.\",\"popularity\":2.341,\"poster_path\":null,\"release_date\":\"2010-01-01\",\"title\":\"The + American Matrix - Age Of Deception\",\"video\":false,\"vote_average\":5.0,\"vote_count\":9},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[99,28,878],\"id\":684729,\"original_language\":\"en\",\"original_title\":\"The Matrix Reloaded: Car Chase\",\"overview\":\"This thirty-minute documentary follows the Wachowski sisters and the film's crew through production on the film's famed highway chase sequence. We get interviews with the visual effects @@ -84,28 +79,40 @@ interactions: production, the scariest aspect of which is certainly Carrie Anne-Moss trying to learn to ride a motorcycle good enough to do so safely without helmet for the scene. We also watch as the stretch of freeway used in the film is being - built.\",\"popularity\":1.282,\"poster_path\":\"/zkpzfTyF7BjadH1PZKlC6kueWXf.jpg\",\"release_date\":\"2004-12-07\",\"title\":\"The - Matrix Reloaded: Car Chase\",\"video\":false,\"vote_average\":6,\"vote_count\":4},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[],\"id\":344225,\"original_language\":\"en\",\"original_title\":\"Sex - and the Matrix\",\"overview\":\"A spoof created for the 2000 MTV Movie Awards, - combining The Matrix and \\\"Sex in the City\\\".\",\"popularity\":0.943,\"poster_path\":null,\"release_date\":\"2000-06-03\",\"title\":\"Sex - and the Matrix\",\"video\":false,\"vote_average\":6.7,\"vote_count\":3},{\"adult\":false,\"backdrop_path\":\"/htYaLEQ41N2Ls7mhWvgP8JD21E3.jpg\",\"genre_ids\":[99],\"id\":505806,\"original_language\":\"en\",\"original_title\":\"A - Glitch in the Matrix\",\"overview\":\"In 'A Glitch in the Matrix', journalist - David Fuller analyzes and assesses Dr. Jordan B Peterson's recent viral interview - with Cathy Newman, unpacking the deeper political, psychological and archetypal - levels of the clash.\",\"popularity\":0.963,\"poster_path\":\"/7vZPj3lFSc6eJsLk5nzvqacvrGR.jpg\",\"release_date\":\"2018-02-17\",\"title\":\"A - Glitch in the Matrix\",\"video\":false,\"vote_average\":6,\"vote_count\":2},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[99],\"id\":274866,\"original_language\":\"en\",\"original_title\":\"The + built.\",\"popularity\":1.656,\"poster_path\":\"/zkpzfTyF7BjadH1PZKlC6kueWXf.jpg\",\"release_date\":\"2004-12-07\",\"title\":\"The + Matrix Reloaded: Car Chase\",\"video\":false,\"vote_average\":6.0,\"vote_count\":4},{\"adult\":false,\"backdrop_path\":\"/b3toMttpZ0cFeYMgLeL042uJJpi.jpg\",\"genre_ids\":[99,28,878],\"id\":684735,\"original_language\":\"en\",\"original_title\":\"Making + 'Enter the Matrix'\",\"overview\":\"A look at Enter the Matrix: The game's + story picks up just before The Matrix Reloaded and runs parallel to that of + the film. Bend the rules of the Matrix with martial arts, pilot the fastest + hovercraft in the fleet, or just fight with lots of guns.\",\"popularity\":1.134,\"poster_path\":\"/zQbJkJkzpB8EthEJ3r2Y6A2kkP6.jpg\",\"release_date\":\"2003-10-14\",\"title\":\"Making + 'Enter the Matrix'\",\"video\":false,\"vote_average\":5.8,\"vote_count\":6},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[99],\"id\":684431,\"original_language\":\"en\",\"original_title\":\"Making + 'The Matrix'\",\"overview\":\"A promotional making-of documentary for the + film Matrix, The (1999) that devotes its time to explaining the digital and + practical effects contained in the film. This is very interesting, seeing + as how they're giving away the cinematic secrets that they created solely + for the this movie, that have now been spoofed and referenced in countless + other films.\",\"popularity\":1.059,\"poster_path\":\"/m2yIfRJYwpCgHON1Ig1pNKMWTxp.jpg\",\"release_date\":\"1999-09-21\",\"title\":\"Making + 'The Matrix'\",\"video\":false,\"vote_average\":7.8,\"vote_count\":12},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[99],\"id\":274866,\"original_language\":\"en\",\"original_title\":\"The Roots of the Matrix\",\"overview\":\"Disc 8 of 10 of 'The Matrix: Ultimate Edition': Probe the philosophical and technological inspirations of The Matrix Trilogy through two insightful documentaries: - Return to Source: Philosophy - & The Matrix documentary \u2013 Scholars, philosophers and theorists deconstruct - the intellectual underpinnings of the trilogy - The Hard Problem: The Science - Behind the Fiction documentary \u2013 Is the notion of a real Matrix plausible? - An investigation of the technologies that inspire the metaphor of the Matrix.\",\"popularity\":1.094,\"poster_path\":\"/qmOtnpPihV3Wj6ukpiNIgzo4Ax7.jpg\",\"release_date\":\"2004-12-07\",\"title\":\"The - Roots of the Matrix\",\"video\":false,\"vote_average\":7,\"vote_count\":3},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[16],\"id\":919064,\"original_language\":\"en\",\"original_title\":\"Me - and The Matrix\",\"overview\":\"Filmmaker Cressa Maeve Beer recalls her experience - growing up as a fan of the Matrix movies, in celebration of the upcoming release - of The Matrix Resurrections.\",\"popularity\":0.6,\"poster_path\":\"/i9A8PKfzxyp4HxjqoEupKcZfofr.jpg\",\"release_date\":\"2021-12-22\",\"title\":\"Me - and The Matrix\",\"video\":false,\"vote_average\":0,\"vote_count\":0},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[28,99,878],\"id\":684721,\"original_language\":\"en\",\"original_title\":\"The + \\u0026amp; The Matrix documentary \u2013 Scholars, philosophers and theorists + deconstruct the intellectual underpinnings of the trilogy - The Hard Problem: + The Science Behind the Fiction documentary \u2013 Is the notion of a real + Matrix plausible? An investigation of the technologies that inspire the metaphor + of the Matrix.\",\"popularity\":0.991,\"poster_path\":\"/qmOtnpPihV3Wj6ukpiNIgzo4Ax7.jpg\",\"release_date\":\"2004-12-07\",\"title\":\"The + Roots of the Matrix\",\"video\":false,\"vote_average\":7.0,\"vote_count\":3},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[99],\"id\":174615,\"original_language\":\"en\",\"original_title\":\"Return + to Source: The Philosophy of The Matrix\",\"overview\":\"An hour long discussion + on the philosophical concepts that inspired, and are presented in the trilogy. + This is one of the two feature-length documentaries on disc number 8 of the + 10-Disc Ultimate Set.\",\"popularity\":1.261,\"poster_path\":\"/8y6mcZbXxL0IIV4GJJ4whLwApow.jpg\",\"release_date\":\"2004-12-07\",\"title\":\"Return + to Source: The Philosophy of The Matrix\",\"video\":false,\"vote_average\":7.0,\"vote_count\":14},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[99],\"id\":684709,\"original_language\":\"en\",\"original_title\":\"Mind + Over Matter: The Physicality of the Matrix Future\",\"overview\":\"A look + at the stunts of The Matrix Revolutions\",\"popularity\":0.951,\"poster_path\":null,\"release_date\":\"2004-04-06\",\"title\":\"Mind + Over Matter: The Physicality of the Matrix Future\",\"video\":false,\"vote_average\":6.8,\"vote_count\":8},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[],\"id\":344225,\"original_language\":\"en\",\"original_title\":\"Sex + and the Matrix\",\"overview\":\"A spoof created for the 2000 MTV Movie Awards, + combining The Matrix and \\\"Sex in the City\\\".\",\"popularity\":0.681,\"poster_path\":null,\"release_date\":\"2000-06-03\",\"title\":\"Sex + and the Matrix\",\"video\":false,\"vote_average\":6.7,\"vote_count\":3},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[99,28,878],\"id\":684721,\"original_language\":\"en\",\"original_title\":\"The Matrix Revolutions: Super Big Mini Models\",\"overview\":\"This making-of piece includes remarks from production designer Owen Paterson, concept artist George Hull, visual effects supervisor John Gaeta, US unit production manager @@ -114,24 +121,13 @@ interactions: Paul Sanchez, US model unit art director Nanci Noblett, conceptual designer Geofrey Darrow, model shop supervisor Michael Lynch, US model unit producer David Dranitzke, prop maker foremen Dave Fogler and Fon Davis, and visual - effects supervisor John \\\"DJ\\\" Des Jardin.\",\"popularity\":1.094,\"poster_path\":\"/2US7uuM36El9pnk8WLdGh1XN39r.jpg\",\"release_date\":\"2004-04-06\",\"title\":\"The - Matrix Revolutions: Super Big Mini Models\",\"video\":false,\"vote_average\":6.8,\"vote_count\":2},{\"adult\":false,\"backdrop_path\":null,\"genre_ids\":[99],\"id\":1038494,\"original_language\":\"en\",\"original_title\":\"Panopticon - Destiny \u2013 The Matrix Files\",\"overview\":\"On August 6th 1977, the world\u2019s - first DOCTOR WHO convention was held at a church hall in Battersea, South - London. Organised by The Doctor Who Appreciation Society (DWAS) , Convention - \u201977 was ground breaking \u2013 featuring sta appearances from the (then) - current Doctor Tom baker with his latest companion Louise Jameson (Leela) - and former Doctor Jon Pertwee. 40 years later, stars, fans and organisers - returned to the church hall to reminisce about that special day! In this - second volume celebrating the anniversary, we feature a convention panel with - organiser Keith Barnfather, contributor Kevin Davies and attendee Andrew Beech, - held at another DWAS event The Capitol II on the 7th May 2017.\",\"popularity\":0.6,\"poster_path\":\"/r1fOhVtFRMqFkG8I6MaK6eDvX8r.jpg\",\"release_date\":\"2021-05-07\",\"title\":\"Panopticon - Destiny \u2013 The Matrix Files\",\"video\":false,\"vote_average\":0,\"vote_count\":0}],\"total_pages\":3,\"total_results\":42}" + effects supervisor John \\\"DJ\\\" Des Jardin.\",\"popularity\":1.65,\"poster_path\":\"/2US7uuM36El9pnk8WLdGh1XN39r.jpg\",\"release_date\":\"2004-04-06\",\"title\":\"The + Matrix Revolutions: Super Big Mini Models\",\"video\":false,\"vote_average\":6.8,\"vote_count\":2}],\"total_pages\":3,\"total_results\":48}" headers: Alt-Svc: - h3=":443"; ma=86400 Cache-Control: - - public, max-age=600 + - public, max-age=28800 Connection: - keep-alive Content-Encoding: @@ -139,26 +135,36 @@ interactions: Content-Type: - application/json;charset=utf-8 Date: - - Fri, 03 Feb 2023 11:38:39 GMT + - Sun, 19 Feb 2023 10:45:52 GMT + Etag: + - W/"a8cc9fe557191adc907bb0612809ae1f" Server: - openresty Transfer-Encoding: - chunked Vary: - - Accept-Encoding,Accept-Encoding + - Accept-Encoding,Accept-Encoding,Accept-Encoding - Origin Via: - - 1.1 97d882fdcaf1da316742a0953a5a0564.cloudfront.net (CloudFront) + - 1.1 fa61e4661f112bc4711a7b0200263e1a.cloudfront.net (CloudFront) X-Amz-Cf-Id: - - l6aBIncJQAerEWWLJd_lhUcxV7TzRJ59lod_Ls3Oqmxj4evJtlBTzQ== + - ROHoLjcKnOTy0gCxsYKNi2U3jCHv1Au8-ZnMYg2Bi0QK87QJ081WgA== X-Amz-Cf-Pop: - LHR50-P2 X-Cache: - Miss from cloudfront + X-Memc: + - HIT + X-Memc-Age: + - "17130" + X-Memc-Expires: + - "4470" + X-Memc-Key: + - 9af8f24bc36c5c16919bf941cbb73dcb95bbc22c status: code: 200 message: OK - url: https://api.themoviedb.org/3/search/movie?api_key=9017d5457c4e8ec5f0999d1b10012ae1&language=en-US&query=The+Matrix&include_adult=false®ion=US&page=1 + url: https://api.themoviedb.org/3/search/movie?api_key=9017d5457c4e8ec5f0999d1b10012ae1&language=en-US&query=The+Matrix&include_adult=false&page=1 - request: body: null headers: {} @@ -172,16 +178,14 @@ interactions: Fiction"}],"homepage":"http://www.warnerbros.com/matrix","id":603,"imdb_id":"tt0133093","original_language":"en","original_title":"The Matrix","overview":"Set in the 22nd century, The Matrix tells the story of a computer hacker who joins a group of underground insurgents fighting the - vast and powerful computers who now rule the earth.","popularity":77.213,"poster_path":"/f89U3ADr1oiB1s9GkdPOEpXUk5H.jpg","production_companies":[{"id":79,"logo_path":"/tpFpsqbleCzEE2p5EgvUq6ozfCA.png","name":"Village + vast and powerful computers who now rule the earth.","popularity":103.28,"poster_path":"/f89U3ADr1oiB1s9GkdPOEpXUk5H.jpg","production_companies":[{"id":79,"logo_path":"/tpFpsqbleCzEE2p5EgvUq6ozfCA.png","name":"Village Roadshow Pictures","origin_country":"US"},{"id":174,"logo_path":"/IuAlhI9eVC9Z8UQWOIDdWRKSEJ.png","name":"Warner Bros. Pictures","origin_country":"US"},{"id":372,"logo_path":null,"name":"Groucho II Film Partnership","origin_country":""},{"id":1885,"logo_path":"/tXMFoE8AtNdnFzWOW0aCLwl7xxS.png","name":"Silver Pictures","origin_country":"US"}],"production_countries":[{"iso_3166_1":"US","name":"United States of America"}],"release_date":"1999-03-30","revenue":463517383,"runtime":136,"spoken_languages":[{"english_name":"English","iso_639_1":"en","name":"English"}],"status":"Released","tagline":"Welcome - to the Real World.","title":"The Matrix","video":false,"vote_average":8.196,"vote_count":22742}' + to the Real World.","title":"The Matrix","video":false,"vote_average":8.2,"vote_count":22819}' headers: - Age: - - "2309" Alt-Svc: - h3=":443"; ma=86400 Cache-Control: @@ -193,9 +197,9 @@ interactions: Content-Type: - application/json;charset=utf-8 Date: - - Fri, 03 Feb 2023 11:00:10 GMT + - Sun, 19 Feb 2023 10:45:52 GMT Etag: - - W/"f94310a8252a3d2405088d72c3a3ad41" + - W/"a0a92138e82228a1484d270e5e7115b4" Server: - openresty Transfer-Encoding: @@ -204,19 +208,19 @@ interactions: - Accept-Encoding,Accept-Encoding,Accept-Encoding - Origin Via: - - 1.1 97d882fdcaf1da316742a0953a5a0564.cloudfront.net (CloudFront) + - 1.1 fa61e4661f112bc4711a7b0200263e1a.cloudfront.net (CloudFront) X-Amz-Cf-Id: - - 1vejK8DlJgPGY0_4wo17sUtYbbQu_2p4C_HkjwacTHqezCLxpFifYg== + - rukYaILcTxDN9SXo4no7Ey9mMbGqVrMhgBAVqSyW-97iTZa3iL5LIg== X-Amz-Cf-Pop: - LHR50-P2 X-Cache: - - Hit from cloudfront + - Miss from cloudfront X-Memc: - HIT X-Memc-Age: - - "12546" + - "14976" X-Memc-Expires: - - "3124" + - "2110" X-Memc-Key: - a52b63b61eb6422a5676648d45b03c1437ec1036 status: diff --git a/tests/fixtures/vcr_cassettes/tmdb/the_matrix_3.yaml b/tests/fixtures/vcr_cassettes/tmdb/the_matrix_3.yaml index 4e525fb..5f725f8 100644 --- a/tests/fixtures/vcr_cassettes/tmdb/the_matrix_3.yaml +++ b/tests/fixtures/vcr_cassettes/tmdb/the_matrix_3.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: {} method: GET - uri: https://api.themoviedb.org/3/search/movie?api_key=9017d5457c4e8ec5f0999d1b10012ae1&language=en-US&query=The+Matrix&include_adult=false®ion=US&page=1&year=2021 + uri: https://api.themoviedb.org/3/search/movie?api_key=9017d5457c4e8ec5f0999d1b10012ae1&language=en-US&query=The+Matrix&include_adult=false&page=1&year=2021 response: body: string: diff --git a/tests/unit/clients/test_tmdb.py b/tests/unit/clients/test_tmdb.py index ba870fb..9dfeb9a 100644 --- a/tests/unit/clients/test_tmdb.py +++ b/tests/unit/clients/test_tmdb.py @@ -92,7 +92,7 @@ async def test_success(self) -> None: f"{VCR_FIXTURES_DIR}/the_matrix_async.yaml", filter_query_parameters=["api_key"], ) as cass: - results = await client.search_movies_async(query="The Matrix") + results = await client.search_movies_async(query="The Matrix", region="US") assert results[0]["title"] == "The Matrix Resurrections" @@ -128,7 +128,6 @@ async def test_success_year(self) -> None: ("language", "en-US"), ("page", "1"), ("query", "The Matrix"), - ("region", "US"), ("year", "1999"), ] diff --git a/tests/unit/sources/test_tmdb.py b/tests/unit/sources/test_tmdb.py index ff82615..b8e3766 100644 --- a/tests/unit/sources/test_tmdb.py +++ b/tests/unit/sources/test_tmdb.py @@ -204,7 +204,7 @@ async def test_year(self) -> None: tmdb = Tmdb("The Matrix") await tmdb.load_source() - assert tmdb.rating == 8.196 + assert tmdb.rating == 8.2 class TestPlot: