imdb-light

1.1.5 • Public • Published

Get a movie or tv series details directly from IMDb.com by IMDb ID - very fast and light !

  • Fetch mp4 trailer url
  • Weekly boxoffice
  • Top 250 movies/series

Details (all responses is string):

  Title
  Year
  Country
  Release
  Rating
  Votes
  Director
  Actors 
  Writers
  Genres
  Poster
  Plot
  Backdrop
  Trailer_id
  Type
  Status

Installation

$ npm i imdb-light

Usage

const IMDb = require('imdb-light');

or in ES6:

import IMDb from 'imdb-light';

Example

  • Fetch a movie/tv details by IMDB id
IMDb.fetch( 'tt7097896', (details) => {
        console.log(details.Title)  // etc...
})

// or with async method

function fetch(id) {
        return new Promise(function (resolve, reject) {
                IMDb.fetch(id, (details) => {
                        resolve(details);
                });
        });
}

async function test(id) {
        var quote = await fetch(id);
        console.log(quote.Title);
}

test('tt7097896');
  • Fetch a movie/tv trailer by IMDB id
IMDb.trailer( 'tt7097896', (url) => {
        console.log(url)  // output is direct mp4 url (also have expiration timeout)
})
  • Weekly Boxoffice
IMDb.boxoffice((details) => {

        details.forEach((media) => {
                console.log(media.title)
                console.log(media.id)
        })
        
})
  • Top 250 Movies
IMDb.topMovies((details) => {
        
        details.forEach((media) => {
                console.log(media.rank)
                console.log(media.title)
                console.log(media.id)
        })

})
  • Top 250 Series
IMDb.topSeries((details) => {

        details.forEach((media) => {
                console.log(media.rank)
                console.log(media.title)
                console.log(media.id)
        })

})

Package Sidebar

Install

npm i imdb-light

Weekly Downloads

4

Version

1.1.5

License

ISC

Unpacked Size

19.8 kB

Total Files

4

Last publish

Collaborators

  • pedroxam