IMDb Utility Library (API)

Utility library for the Internet Movie Database. Provides an API for grabbing info from IMDb.com

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.gf.qytechs.cn/scripts/390115/733074/IMDb%20Utility%20Library%20%28API%29.js

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
driver8
版本
0.1.1
建立日期
2019-09-14
更新日期
2019-09-14
尺寸
4.1 KB
授權條款
未知

Provides three functions:


getImdbIdFromTitle(title[, year]])
Searches for a movie or TV show with the given title (and optionally year) and returns the IMDb ID (e.g. "tt0091080") for the best match.
title: title of the movie or show to search for
year: year it was published (optional)



getImdbInfoFromId(id):
Given an IMDb ID (e.g. "tt0091080"), looks up that movie or TV show and returns an object with the following properties:
id: RottenTomatoes ID (e.g. "tt0091080")
title: Release title
year: Release year according to IMDb
description: IMDb's description of the title
rating: IMDb rating (e.g. 6.9)
votes: Number of ratings counted
metascore: MetaCritic score according to IMDb
popularity: IMDbMeter popularity
dateFetched: Date object of when data was fetched (now)



getRtInfoFromTitle(title[, year]])
Searches for a movie or show with the given title (and optionally year) using getImdbIdFromTitle and returns the data from getImdbInfoFromId for the best match.
title: title of the movie or show to search for
tv: is it a TV show? (default: false)
year: year it was published (optional)


Examples:

Get movie info

getImdbInfoFromTitle('friday the 13th', 1986);

Returns:

{
  "id": "tt0091080",
  "title": "Friday the 13th Part VI: Jason Lives",
  "year": "1986",
  "description": "Tommy Jarvis goes to the graveyard to get rid of Jason Voorhees' body once and for all, but inadvertently brings him back to life instead. The newly revived killer once again seeks revenge, and Tommy may be the only one who can defeat him.",
  "rating": "6.0",
  "votes": "34,148",
  "metascore": "30",
  "popularity": "4,616",
  "fetched": "2019-09-14T05:44:46.498Z"
}