Skip to content

Instantly share code, notes, and snippets.

@jslnriot
Created April 30, 2019 17:32
Show Gist options
  • Save jslnriot/8a5d6d66ae628d0bb879d6961497dec6 to your computer and use it in GitHub Desktop.
Save jslnriot/8a5d6d66ae628d0bb879d6961497dec6 to your computer and use it in GitHub Desktop.
import { getHTML, getAmazonPrice } from './scrape';
const productURL = `https://www.amazon.ca/Vitamix-Explorian-Professional-Grade-Low-Profile-Refurbished/dp/B07CXVSMZ4/ref=sr_1_5?keywords=vitamix&qid=1555870204&s=gateway&sr=8-5&th=1`;
async function scrapePage() {
const html = await getHTML(productURL);
const amazonPrice = await getAmazonPrice(html);
console.log(`The price is ${amazonPrice}`);
}
scrapePage();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment