/PSN-Store-Scraper

Retrieve readable object from PSN-Store Links

Primary LanguageJavaScript

PSN Store Scraper

Usage

Import the constructor:

let Scraper = require('psn-store-scraper').Scraper;

Using the Promises to retrieve:

Scraper.scrape("https://store.playstation.com/de-de/product/XXXXX").then(result => console.log(result))

Calling a Callback:

Scraper.scrape("https://store.playstation.com/de-de/product/XXXXX", function(sObject){
    console.log(sObject.name);
});

Settings:

//sets the console.log flags
let settingsObject = { 
        logOutput: true, //default false
        logError: true //default true
    };

Scraper.scrape("https://store.playstation.com/de-de/product/XXXXX", function(sObject){
    console.log(sObject.name);
}, settingsObject);

StoreObject

    id
    name
    old_price
    discount {
        new_price
        plus_required
        discount_percent
    }
    type
    size
    platforms
    release_date
    provider
    description
    images [
        {
            type
            url
        }
    ]