Closed sophyphreak closed 4 years ago
@sophyphreak I guess you found a solution by this time.
For everyone else looking for a quick workaround:
(async () => {
const site = {
name: 'amazon',
hosts: ['http://www.amazon.com'],
scrape: async (page) => {
const title = await Scraper.getText('#title', page);
const price = await Scraper.getText('span#price_inside_buybox.a-color-price', page);
const image = await Scraper.getSrc('img.a-dynamic-image', page);
const description = await Scraper.getText('#featurebullets_feature_div', page);
const availability = await Scraper.getText('#availability', page);
const data = {
title,
price,
image,
description,
inStock: availability.toLocaleLowerCase().indexOf('in stock') > -1,
};
return data;
},
};
const data = await Scraper.scrape('http://www.amazon.com/gp/product/B07G4MLC4M/', site);
console.log(data);
})();
updated the internals on this guy
Sample output reads:
Price data is blank. Needs to be updated