0

I cannot find a way to get detailed data about movies released in 2018, while all works fine for older movies. I use default 'http' access (as described here: https://imdbpy.sourceforge.io/docs/README.package.txt)

How to get access to updated data???

Let's say i want to see details about Aquaman which is released winter 2018:

>>> aq = ia.search_movie('Aquaman')
>>> aq = aq[0]
>>> print(aq.keys())
['title', 'kind', 'year', 'canonical title', 'long imdb title', 'long imdb canonical title', 'smart canonical title', 'smart long imdb canonical title']

However all works fine for Deadpool, which is quite old movie! (I use this example to test: get the company info for a movie from IMDB using IMDBPY, so it's ok for records before 2018)

 print(dp.keys())

['title', 'kind', 'year', 'cast', 'genres', 'runtimes', 'countries', 'country codes', 'language codes', 'color info', 'aspect ratio', 'sound mix', 'certificates', 'original air date', 'rating', 'votes', 'cover url', 'plot outline', 'languages', 'directors', 'writers', 'producers', 'composers', 'cinematographers', 'editors', 'editorial department', 'casting directors', 'production designers', 'art directors', 'set decorators', 'costume designers', 'make up department', 'production managers', 'assistant directors', 'art department', 'sound department', 'special effects', 'visual effects', 'stunts', 'camera department', 'animation department', 'casting department', 'costume departmen', 'location management', 'music department', 'transportation department', 'miscellaneous', 'thanks', 'akas', 'writer', 'director', 'production companies', 'distributors', 'special effects companies', 'other companies', 'plot', 'synopsis', 'canonical title', 'long imdb title', 'long imdb canonical title', 'smart canonical title', 'smart long imdb canonical title', 'full-size cover url']

So, i hope to be able to fetch company's data for Aquaman the same way as it's done for the Deadpool, because this data is already on the imdb web page.

cat_on_the_mat
  • 100
  • 1
  • 9

1 Answers1

0

Since search_movie() returns a list of movie objects who have 'year' as one of their parameters, you could search for the string you want, then filter out by year.

>>> deadpool_matches = ia.search_movie('Deadpool')
>>> deadpool_movies_2018 = [ m for m in deadpool_matches if m['year'] == '2018' ]
>>> likely_best_match = deadpool_movies_2018[0]

EDIT: Since you referred to Deadpool as "quite [an] old movie!", it sounded like you were referring to the 1988 Dirty Harry movie and trying to eliminate titles like that or the 2016 "Deadpool" movie (hardly "an old movie") in order to get the 2018 sequel. I see now that when trying to extract info on movies from 2018, you're saying the info simply doesn't come back even though it works for movies before 2018.

Does update(aq[0]) populate it?

Bill M.
  • 1,388
  • 1
  • 8
  • 16
  • it seems that you misunderstood the question, but thanks for an attempt to help. Everything is ok with Deadpool, and i am not looking for similar movies in 2018. I have my list of movies i need for 2018, Aquaman is one of them, or Incredibles 2 (released summer 2018). I need company data for movie 2018, but it's not in the keys(), while it's on the web page. I believe that web version is dated or i cannot access the updated one it properly. – cat_on_the_mat Dec 20 '18 at 21:37
  • the reason you get very little information before calling the *update* method is that the objects returned by a query contains very little information and must be updated. See https://imdbpy.readthedocs.io/en/latest/usage/query.html?highlight=update – Davide Alberani Dec 23 '18 at 19:00