leandcesar / themoviedb

A modern and easy to use API wrapper for The Movie Database (TMDb) API v3 written in Python.
https://pypi.org/project/themoviedb
MIT License
25 stars 7 forks source link

How to do paging #28

Open ocervell opened 2 months ago

ocervell commented 2 months ago

Hi there,

First thanks for this very-well written Python API binding for TMDB API: saves my life !

I'm currently searching movies like this:

movies = tmdb_client.search().movies(query=title, primary_release_year=year)

but it returns only 20 results, since I suppose it queries only the first page.

Is it up to me to pass the page parameter and increase it till there is no result, or is there a utility that I'm unaware of that can do that for me automatically ? Is there a way to know the total number of pages ?

Thank you !