metacritic-scraper

0.3.4 • Public • Published

Metacritic Scraper

npm version

A node package for getting information from the Metacritic website

A bit of information

Note that this package is very much a scraper, and therefore, may stop working as aspected on any design change of the Metacritic website. If this happens, feel free to leave an issue on this repository so I can do something about it, or even better, leave a pull request with a fix.

Also note that this package does not, by any means, exhaust the full list of Metacritic features, for now, it only supports getting information from movies. That being said, I do intend to complete this list eventually, even if it might take a while.

Installing

Run npm install metacritic-scraper to install this package.

Usage

This package mainly works by using the search function and feeding it's results to the other functions. For example, getting critic reviews for the movie Sausage Party works like this:

const metacritic = require('metacritic-scraper')
 
metacritic.search('sausage party', {category: 'movie'}).on('end', (results) => {
    // this assumes that the movie will be the first result
    metacritic.getProduct(results[0]).on('end', (info) => {
        console.log(info.reviews.critic_reviews)
    })
})

You can handle errors with .on('error').

Reference

search(text, options)

Search the Metacrtic website and return the results

Param Type Default Description
text String Text sent to the search query
options Object
options.category String 'all' Category from which to get results. (Can be all, movie, game, album, tv, person, video or company)
options.page Number 0 Page from which to get results

getProduct(search_object)

Get additional information about a product. (Currently only supports movies)

Param Type Description
object Object A result returned from the search function

Readme

Keywords

Package Sidebar

Install

npm i metacritic-scraper

Weekly Downloads

0

Version

0.3.4

License

MIT

Unpacked Size

12.4 kB

Total Files

10

Last publish

Collaborators

  • pedroteosousa