itsmehemant7 / PyMovieDb

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

No results from API #10

Open eavildosola opened 1 year ago

eavildosola commented 1 year ago

Hi I'm using this API and different endpoint such as imdb.get_by_name('House Of The Dragon', tv=True), or imdb.get_by_id("tt12593682") and I have always the result below:

{"status": 404, "message": "No Result Found!", "result_count": 0, "results": []} ​ I have installed sucessfully and followed all the steps..

thisguyshouldworkforus commented 1 year ago

I am having the same issue on pages that exist:

IMDB_SEARCH_ID = json.loads(imdb.search('tt13610512', tv=True)) print(IMDB_SEARCH_ID)

{'result_count': 0, 'results': []}

and this is the page: https://www.imdb.com/title/tt13610512/

itsmehemant7 commented 1 year ago

The module picks data from structured data. I have seen a few results on IMDB with wrong-structured data. So the reason behind no output is the wrong/unparsable structred json/ld data of imdb.

samarthdave commented 12 months ago

adding to what @itsmehemant7 said:

I'm getting the same error so I've been using imdb.search(...) instead of imdb.get_by_id('tt1517268') where tt1517268 is Barbie (2023)

current use case: sending IMDB movies/tv shows to a Notion database. Anyways, I've isolated one way to find which media works and doesn't: if it has a trailer video. I think this suggests there's something about the page that just loads different metadata which this library can parse.

Oppenheimer and Mission Impossible

imdb.get_by_id('tt15398776') doesn't load Oppenheimer

{'status': 404, 'message': 'No Result Found!', 'result_count': 0, 'results': []}

but imdb.get_by_id('tt9603212') shows the Mission Impossible content

I could dig into the differences on the page and try to make get_by_id() more resilient but right now, I'm just copying the content manually or using imdb.search()