cinemagoer / cinemagoer

Cinemagoer is a Python package useful to retrieve and manage the data of the IMDb (to which we are not affiliated in any way) movie database about movies, people, characters and companies
https://cinemagoer.github.io/
GNU General Public License v2.0
1.22k stars 352 forks source link

Metascore key missing #444

Open Verpous opened 1 year ago

Verpous commented 1 year ago

Issue description

Movies no longer contain the 'metascore' key for me. My script hasn't changed at all, but movies which used to have a metascore key and that I can see have a metascore on IMDb do not have a metascore key anymore. It's been like this for weeks.

Version of Cinemagoer, Python and OS

Python 3.9.7 Cinemagoer 2022.12.27 (pip install -U cinemagoer says I am up to date) uname_result(system='Windows', node='Euclid', release='10', version='10.0.19045', machine='AMD64')

Steps to reproduce the issue

#!/usr/bin/env python

from imdb import Cinemagoer
ia = Cinemagoer()
movie= ia.get_movie('0118715', info=(*Movie.default_info, 'critic reviews'))
print(movie['metascore'])

What's the expected result?

The metascore is printed

What's the actual result?

KeyError: 'metascore'

tableaukun commented 1 year ago

I can also confirm this is happening.

Rabelaiss commented 1 year ago

Also the key year is missing when using .search_movie:

movie_list = ia.search_movie_advanced('thor')
movie_list

[<Movie id:0800369[http] title:_Thor (None)_>,
 <Movie id:10648342[http] title:_Thor: Love and Thunder (None)_>,
 <Movie id:3501632[http] title:_Thor: Ragnarok (None)_>,
...

movie_list[0].keys()

['title',
 'kind',
 'cover url',
 'canonical title',
 'long imdb title',
 'long imdb canonical title',
 'smart canonical title',
 'smart long imdb canonical title',
 'full-size cover url']

Still works when using .search_movie_advanced though.

alberanid commented 1 year ago

@Rabelaiss : the problem with the 'year' key in searches should be fixed by #447 .

I can confirm that the critic review parser is broken.