IMDb 是否提供 API 或数据转储来获取所有标题 ID?

发布于 2024-11-16 17:13:06 字数 357 浏览 4 评论 0原文

IMDB 提供用户可以下载和使用的纯文本文件,可以在这里找到:IMDB 纯文本文件,这很棒,但我不知道查看任何文件中每部电影使用的 ID。

鉴于 IMDB 在其使用条件中明确表示不要使用抓取工具、数据收集器等,如何获取标题 ID http://www每部电影的 .imdb.com/title/tt1133985/(如果它们未包含在任何纯文本文件中)。

我注意到其他人构建的一些 API 确实包含此 ID,所以我想知道他们是如何做到这一点的。

IMDB provides plain text files user's can download and use which can be found here: IMDB Plain Text Files which is great but I don't see the ID used for each movie in any of the files.

Given IMDB specifically says not to use scrapers, data gatherers etc in their Conditions of Use how would one obtain the title ID http://www.imdb.com/title/tt1133985/ for each movie if they aren't included in any of the plain text files.

I've noticed there are some API's others have built that do include this ID so I'm wondering how did they manage to do that.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

旧话新听 2024-11-23 17:13:06

您可以使用位于

www.omdbapi.com

的 IMDB API您可以像这样搜索电影名称 -

http://www.omdbapi.com/?t=hangover%202

{
"Title":"The Hangover Part II",
"Year":"2011",
"Rated":"R",
"Released":"26 May 2011",
"Genre":"Comedy",
"Director":"Todd Phillips",
"Writer":"Craig Mazin, Scot Armstrong",
"Actors":"Bradley Cooper, Zach Galifianakis, Ed Helms, Justin Bartha",
"Plot":"Right after the bachelor party in Las Vegas, Phil, Stu, Alan, and Doug jet to Thailand for Stu's wedding. Stu's plan for a subdued pre-wedding brunch, however, goes seriously awry.",
"Poster":"http://ia.media-imdb.com/images/M/MV5BMTM2MTM4MzY2OV5BMl5BanBnXkFtZTcwNjQ3NzI4NA@@._V1_SX320.jpg","
Runtime":"1 hr 42 mins",
"Rating":"7.1",
"Votes":"13547",
"ID":"tt1411697",
"Response":"True"
} 

您可以获得“ ID” (tt1411697) 来自此 JSON 响应。

You can use IMDB API located at

www.omdbapi.com

You can search for movie names like this -

http://www.omdbapi.com/?t=hangover%202

{
"Title":"The Hangover Part II",
"Year":"2011",
"Rated":"R",
"Released":"26 May 2011",
"Genre":"Comedy",
"Director":"Todd Phillips",
"Writer":"Craig Mazin, Scot Armstrong",
"Actors":"Bradley Cooper, Zach Galifianakis, Ed Helms, Justin Bartha",
"Plot":"Right after the bachelor party in Las Vegas, Phil, Stu, Alan, and Doug jet to Thailand for Stu's wedding. Stu's plan for a subdued pre-wedding brunch, however, goes seriously awry.",
"Poster":"http://ia.media-imdb.com/images/M/MV5BMTM2MTM4MzY2OV5BMl5BanBnXkFtZTcwNjQ3NzI4NA@@._V1_SX320.jpg","
Runtime":"1 hr 42 mins",
"Rating":"7.1",
"Votes":"13547",
"ID":"tt1411697",
"Response":"True"
} 

You can get the "ID" (tt1411697) from this JSON response.

雨的味道风的声音 2024-11-23 17:13:06

如前所述,IMDB 没有网络服务。 imdbapi 通过屏幕抓取来工作。可供下载的平面文件是 IMDB 诞生之前的亚马逊时期遗留下来的,其中的信息并不完整。 (您无法仅使用可用的文件构建自己的 IMDB)

但是,Rotten Tomatoes 确实有一个很好的 Web 界面,可以返回,其中其他信息,电影的 IMDB ID - 在 alternate_ids 部分。因此,您可以使用Rotten Tomatoes API来获取imdb id,而无需直接屏幕抓取imdb。

烂番茄的数据库不如 IMDB 广泛,但它对于现代(1995 年以上)美国版本的表现相当不错。

As mentioned, IMDB does not have a web service. imdbapi works by screen scraping. The flat files available for download are a legacy from IMDB's pre-Amazon days, and the information there is incomplete. (You could not build your own IMDB with just the files that are available)

However, Rotten Tomatoes does have a nice web interface that returns, among other things, the imdb id of the films - in the alternate_ids section. So, you could use the Rotten Tomatoes API to obtain the imdb id without screen scraping imdb directly.

Rotten Tomatoes' database is less extensive than IMDB's, but it does a pretty good job with modern (1995+) US releases.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文