-
Notifications
You must be signed in to change notification settings - Fork 352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
attribute age range
added to movie
#413
base: master
Are you sure you want to change the base?
attribute age range
added to movie
#413
Conversation
Thanks for the PR! I'm still undecided about it: the same information can be found in the 'certificates' key, in a list of "country:certificate" strings; would that be enough for your use case? The value you extract is probably the one for the USA. I'm mostly worried about the fact that not all movies may have the same entries in that banner (e.g. "PG-13 | 2h 22min | Drama, Romance | 06 Oct 1994 (Italy) | Movie" for Forrest Gump, accessed via browser) and so it could be difficult to assign the correct meaning to the first element. What happens for movies that were not rated, for example? An example: #!/usr/bin/env python
import imdb
ia = imdb.Cinemagoer('http')
fg = ia.get_movie('0109830')
#print(sorted(fg.keys()))
print(fg['certificates']) will print:
What's your opinion? Thanks! |
@alberanid |
I see; yes, probably the best way to do it is to look in the 'certificates' list if your country is present and - if not - use the value for the USA or any other available. After that you can map that value to an age, like you are already doing. In any case, let's keep this PR open for a while; maybe it can be useful to parse the values in that banner but we have to better understand if it's possible to identify the information unambiguously. Plus, right now everything is a mess since some recent changes in IMDb broke half of our parsers (see #419 and #421 and more will follow). Thanks! |
No description provided.