IMDb Search

Search on imdb.com

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
Noël
日安装量
0
总安装量
41
评分
1 0 0
版本
1.5
创建于
2015-10-20
更新于
2016-03-07
大小
19.9 KB
许可证
暂无
适用于
所有网站

This is a small script for people to use in there scripts.This does not do anything on his own... I am posting this because I am using this in some other script hope some of u get some use of it....

when not providing a callback it will log the result in console.

IMDb.search(arg) search on IMDb when found calls IMDb.info

    arg = {
             title:   string,      //Title to search (required)
             year:    string,      //year (not required)
             type:    string,      //movie,tv or game (not required) default movie
             node:    HTMLElement, //you can pass along a node that will be passed to the callback(not required)
             callback:function,    //set a callback function: function(info = object ,node = HTMLElement){your code....} (not required)
                                   //default function(info){console.log(info)}.
    }
    

IMDb.info(arg) when you know the IMDb ID you can call this direct.

    arg = {
             id:      string,      //IMDb ID (required) ex. "tt2488496" 
             node:    HTMLElement, //you can pass along a node that will be passed to the callback(not required)
             callback:function,    //set a callback function: function(info = object ,node = HTMLElement){your code....} (not required)
                                   //default function(info){console.log(info)}.
    }
    
    info returned:
    {
         Title:         string,
         Year:          string,
         ID:            string,
         Rating:        string,
         ratingCount:   string,
         contentRating: string,
         Duration:      string,
         releaseDate:   string,
         Genre:         string,
         URL:           string,
         Poster:        string,
         Trailer:       string,
         InWatchList:   boolean,
         InLists:       array,//->[string,...] string = list ID
         Description:   string,
         Stars:         array,//->[object,...] object = {Name:string,Image:string,URL:string} 
         Creator:       array,//->[object,...] object = {Name:string,Type: string,URL:string} 
         Director:      array,//->[object,...] object = {Name:string,URL:string} 
    }
    

IMDb.inLists(arg) see if the movie is in one of your lists.

    arg = {
             id:      string,      //IMDb ID (required) ex. "tt2488496"
             node:    HTMLElement, //you can pass along a node that will be passed to the callback(not required)
             callback:function,    //set a callback function: function(info = object ,node = HTMLElement){your code....} (not required)
                                   //default function(info){console.log(info)}.
    }
    
    info returned:
    {
         InWatchList:   boolean,
         InLists:       array,//->[string,...] string = list ID
    }
    

IMDb.getYouTube(arg) this get a trailer from youtube

    arg = {
             title:   string      //Title to search (required)
             year:    string      //year (not required)
             type:    string      //movie,tv or game (not required) default movie
             node:    HTMLElement //you can pass along a node that will be passed to the callback(not required)
             callback:function    //set a callback function: function(info = object ,node = HTMLElement){your code....} (not required)
                                  //default function(info){console.log(info)}.
    }
    
    info returned:
    {
         Trailer:       string,
    }