So I am trying to scrap some useful data from a website .
Current Steps are
Wait for the particular Selector which holds the data.
and then use Page.evaluate to do some processing
Source Code
const link = "https://solscan.io/nfts#trades";
const puppeteer = require("puppeteer");
(async () => {
const browser = await puppeteer.launch({ headless: false });
const page = await browser.newPage();
await page.goto(link);
await page.waitForSelector("div.ant-table-content");
const tradeTable = await page.evaluate(() =>
document.querySelector("div.ant-table-content")
);
console.log(tradeTable);
await browser.close();
})();
All I try to do is console.log the result but for some reason it returns a undefined value.