itsmehemant7 / PyMovieDb

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

search() throws an Assertion if the value for year is not an int #17

Closed netllama closed 6 months ago

netllama commented 1 year ago
In [62]: year
Out[62]: '2007'

In [63]: title
Out[63]: 'Grindhouse.'

In [64]: res0 = imdb.search(title, year=year)
---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
Cell In [64], line 1
----> 1 res0 = imdb.search(title, year=year)

File /usr/local/lib/python3.11/site-packages/PyMovieDb/imdb.py:73, in IMDB.search(self, name, year, tv, person)
     71     url = f"https://www.imdb.com/find?q={name}"
     72 else:
---> 73     assert isinstance(year, int)
     74     url = f"https://www.imdb.com/find?q={name}+{year}"
     75 # print(url)

AssertionError: