title: Scraping Amazon prices with Puppeteer
body: <p>I tried to scrape an Amazon page to get the price of a product, but the scraping result gives me different amounts of money than shown in the actual browser. I checked many times but couldn't get the right result. It gives me $89.99 dollars while on the actual site the product costs $58.95. Does Amazon confuse web scrapers and crawlers intentionally or is it my fault? I used Puppeteer and JSDom in NodeJS.</p>
  <p>NodeJS code:</p>
  <pre><code>const puppeteer = require('puppeteer');
  const jsdom = require('jsdom');
  const { JSDOM } = jsdom;
  
  const url = 'https://www.amazon.com/Razer-DeathAdder-Chroma-Multi-Color-Comfortable/dp/B00MYTSDU4/ref=sr_1_2?dchild=1&amp;keywords=Deathadder%2BChroma&amp;qid=1625425444&amp;sr=8-2&amp;th=1';
  
  async function configureBrowser() {
      const browser = await puppeteer.launch();
      const page = await browser.newPage();
      await page.goto(url);
      return page;
  }
  
  async function pageContent() {
      let page = await configureBrowser();
      // await page.reload();
      let html = await page.evaluate(() =&gt; document.body.innerHTML);
      await page.close();
  
      console.log(new JSDOM(html).window.document.querySelector('#priceblock_ourprice').textContent);
  
      // return new JSDOM(html).window.document.querySelector('#priceblock_ourprice').textContent;
  }
  
  module.exports = pageContent;
  </code></pre>