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

喜欢而已 提交于 2019-12-09 14:58:32

问题


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:

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?


回答1:


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.



来源:https://stackoverflow.com/questions/5342329/can-i-retrieve-imdbs-movie-recommendations-for-a-given-movie-using-imdbpy

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!