Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I retrieve IMDb's movie recommendations for a given movie using IMDbPY?

Tags:

python

imdb

I'm using IMDbPY to retrieve all kinds of data about movies. For example, if I have a movie object of "Pulp Fiction (1994)" then I can get the name of its (first) director like this:

>>> pulp_fiction['director'][0]['name']
    u'Quentin Tarantino'

Or the name of the third actor:

>>> pulp_fiction['cast'][2]['name']
    u'Samuel L. Jackson'

In ways similar to this I can retrieve all kinds of information for a given movie (budget, length, storyline, list of goofs, trivia, etc).

The piece of information I'm looking for is recommendations (other movies similar to the current movie). IMDb provides such a thing for each movie:

pulp fiction recommendations

Is it possible to access the recommendations using IMDbPY? If not, is there another way to access the recommendations which doesn't require me to parse webpages?

like image 788
snakile Avatar asked Mar 17 '11 16:03

snakile


People also ask

How do I extract reviews from a movie on IMDb?

Yes, you can extract reviews using IMDbPY. Colab Notebook. Here is what you have to understand about IMDbPY, it retrieves data from IMDB for various objects such as movie, person and company using methods get_movie, get_person, and get_company respectively.

What is Python IMDb?

IMDbPY is a Python package which is used to retrieve and manage the data of the IMDb.


1 Answers

Looking in the source, I found something:

http://bitbucket.org/alberanid/imdbpy/src/579c50b280f9/imdb/parser/http/init.py

check def get_movie_recommendations(self, movieID)

I haven't tried it, but it looks like it might be doing what you are looking for.

like image 192
JoshAdel Avatar answered Oct 02 '22 13:10

JoshAdel