1

我想从 IMDbPY 获取列表中的所有电影 ID。我想分析给定年份最流行的类型、演员等。例如,在 2014 年使用 scikit-learn 或其他库查找流行电影、流行演员、流派等。如何获取movieID列表?

4

2 回答 2

2

转到此链接http://grouplens.org/datasets/movielens/并下载 ml-latest-small.zip

它将为您提供 33k 电影的列表,其中包含指向 imdb id 的 int 链接。(建议:imdb 使用 id 以两个 tt 和一个固定数字开头,因此您必须完成电影镜头给出的 id 但这没什么大不了的)
然后您可以使用此 id 查询 omdb 并从 omdb 获取所有可用信息或执行imdb 网站上的一些网页抓取(omdb 速度更快但信息较少)。

如果你愿意,我可以转发一些我用 tmdb、imdb、omdb 和 ml-latest 制作的数据库。

于 2016-04-05T08:59:11.580 回答
0

似乎不支持 IMDbPY 来获取所有列表,如果你不依赖这个,那么

这可能会帮助你

用法

将所有数据请求发送至:

http://www.omdbapi.com/

海报 API 请求:

http://img.omdbapi.com/?apikey=[yourkey]&

例子:

http://www.omdbapi.com/?t=zootopia&y=2016&plot=full&r=json

回复:

 {
Title: "Zootopia",
Year: "2016",
Rated: "PG",
Released: "04 Mar 2016",
Runtime: "108 min",
Genre: "Animation, Action, Adventure",
Director: "Byron Howard, Rich Moore, Jared Bush",
Writer: "Byron Howard (story), Jared Bush (story), Rich Moore (story), Josie Trinidad (story), Jim Reardon (story), Phil Johnston (story), Jennifer Lee (story), Jared Bush (screenplay), Phil Johnston (screenplay), Dan Fogelman (additional story material)",
Actors: "Ginnifer Goodwin, Jason Bateman, Idris Elba, Jenny Slate",
Plot: "From the largest elephant to the smallest shrew, the city of Zootopia is a mammal metropolis where various animals live and thrive. When Judy Hopps becomes the first rabbit to join the police force, she quickly learns how tough it is to enforce the law. Determined to prove herself, Judy jumps at the opportunity to solve a mysterious case. Unfortunately, that means working with Nick Wilde, a wily fox who makes her job even harder.",
Language: "English, Norwegian",
Country: "USA",
Awards: "N/A",
Poster: "http://ia.media-imdb.com/images/M/MV5BOTMyMjEyNzIzMV5BMl5BanBnXkFtZTgwNzIyNjU0NzE@._V1_SX300.jpg",
Metascore: "78",
imdbRating: "8.4",
imdbVotes: "42,414",
imdbID: "tt2948356",
Type: "movie",
Response: "True"
}
于 2016-04-05T07:28:22.913 回答