itsmehemant7 / PyMovieDb

A Simple IMDb API for Python
MIT License
90 stars 18 forks source link

Only getting 5 results from search #13

Open BlindSanji opened 1 year ago

Anomi-Dev commented 1 year ago

In imdb.py, in the section "....method to search on IMDB...."

name = name.replace(" ", "+")
if year is None: url = f"https://www.imdb.com/find?q={name}" else: assert isinstance(year, int) url = f"https://www.imdb.com/find?q={name}+{year}"

To search for Movies change the to urls to: url = f"https://www.imdb.com/find?s=tt&q={name}" url = f"https://www.imdb.com/find?s=tt&q={name}+{year}"

To search for TV Shows change the to urls to: url = f"https://www.imdb.com/find?s=ep&q={name}" url = f"https://www.imdb.com/find?s=ep&q={name}+{year}"

To search for Actors/Celebs change the to urls to: url = f"https://www.imdb.com/find?s=nm&q={name}" url = f"https://www.imdb.com/find?s=nm&q={name}+{year}"