Search code examples
python-2.7imdbimdbpy

imdbpy rating data missing



i have a question about the imdbpy module for python, for some reason i can't retrieve some data about tv shows even though they exist on the imdb.com website.
for example if i use this code:

from imdb import IMDb
i = IMDb()
s = i.search_movie('killjoys')
m = i.get_movie(s[0].movieID)
print m.get('rating') 

the result is None even though on the imdb.com it's available so what should i so here? and thanks for the help :)


Solution

  • the solution i found is to use a different library called omdb

    import omdb
    tv_show_name = "hannibal"
    movie = omdb.get(title=tv_show_name, fullplot=True, media_type="series")
    rating = movie.imdb_rating
    

    there you go this might help someone someday ;)