IMDB API – 检索来自列表的所有电影?

huangapple go评论110阅读模式
英文:

IMDB API - Retrieve all movies from a list?

问题

Sure, here's the translation:

我想知道是否有一种方法可以通过API检索列表中的所有电影(例如:https://www.imdb.com/list/ls052535080/)?

我没有找到适用于这种用途的信息。

谢谢您的帮助!

英文:

I would like to know if there is a way to retrieve all the movies from a list (this one for example : https://www.imdb.com/list/ls052535080/) via an API ?

I see nothing for this kind of use.

Thanks for your help !

答案1

得分: 1

只需在列表URL末尾添加“export”一词,它将变为https://www.imdb.com/list/ls052535080/export

英文:

Just add export word to the end of the list url, it'll be https://www.imdb.com/list/ls052535080/export

答案2

得分: 0

IMDB没有专门的API。这可能有所帮助(网页抓取)--

import requests
import browsercookie
import bs4
url = 'https://www.imdb.com/user/ur<user_id>/lists?ref_=nv_usr_lst_3'
cj = browsercookie.chrome()
res = requests.get(url, cookies=cj)
res.raise_for_status()
soup = bs4.BeautifulSoup(res.text, "html.parser")
英文:

IMDB does not have any API as such.
This could help (web scraping) --

import requests
import browsercookie
import bs4
url = &#39;https://www.imdb.com/user/ur&lt;user_id&gt;/lists?ref_=nv_usr_lst_3&#39;
cj = browsercookie.chrome()
res = requests.get(url, cookies=cj)
res.raise_for_status()
soup = bs4.BeautifulSoup(res.text, &quot;html.parser&quot;)

答案3

得分: 0

不需要使用API。所有列表都具有导出功能,该功能将以CSV文件的形式提供整个列表,其中包含各种字段:

  • 职位、常数、创建时间、修改时间、描述、标题、URL、标题类型、IMDb评分、时长(分钟)、年份、类型、投票数、发布日期、导演、您的评分、评分日期

只需打开列表页面,即:/list/ls#########/, 然后点击页面右上角的垂直省略号菜单按钮:

IMDB API – 检索来自列表的所有电影?

然后点击弹出菜单中的“导出”链接:

IMDB API – 检索来自列表的所有电影?

您将会收到一个以列表名称为基础的CSV文件提示。

英文:

No API needed for this. All lists have an export function which will provide the entire list as a csv file containing a variety of fields:

  • Position, Const, Created, Modified, Description, Title, URL, Title Type, IMDb Rating, Runtime (mins), Year, Genres, Num Votes, Release Date, Directors, Your Rating, Date Rated

Simply open up the list page ie: /list/ls#########/, click the vertical ellipsis menu button at the top right of the page:

IMDB API – 检索来自列表的所有电影?

Then click the "Export" link in the popup menu:

IMDB API – 检索来自列表的所有电影?

You'll be prompted with a csv file that has a filename based on the list name.

huangapple
  • 本文由 发表于 2020年1月3日 21:42:36
  • 转载请务必保留本文链接:https://go.coder-hub.com/59579647.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定