npm.io
2.1.3 • Published 5 years ago

imdb-score

Licence
ISC
Version
2.1.3
Deps
2
Size
3 kB
Vulns
23
Weekly
0

IMDB SCORE

This is a small tool to get the IMDB score by IMDB ID.

Example

const IMDB = require('imdb-score')

const main = async () => {
    // Default, Grab score from webpage
    const scores = await IMDB.init("tt5491994").score()

    // OMDB API, if fail, fall back to grab score from webpage
    const scores = await IMDB.init("tt5491994").omdbKey("Your Key").score()

    // Retry request for 5 times
    // Default to 3 if you don't call retry method
    const scores = await IMDB.init("tt5491994").retry(5).score()
}
main()