How can I get only the ratings using IMDbPY/cinemagoer package?

142 views Asked by At

I'm using the Python package cinemagoer to scrape ratings of movies and I want to do it fast. I can retrieve the ratings with my code, but it takes mostly 3 seconds.

Is there an option to get only the ratings and not the whole main infoset? My thoughts are, that I rewrite my code to something like ia.get_movie(movie, info=['main']['rating'] but it does not work.

import time
from imdb import Cinemagoer

ia = Cinemagoer()

the_matrix = ia.get_movie('0133093', info=['main'])
print('rating is', the_matrix.get('rating'))
0

There are 0 answers