Skip to content

Instantly share code, notes, and snippets.

@shriyaRam
Last active June 23, 2020 09:20
Show Gist options
  • Save shriyaRam/af9e9f289566028ad86d6afb63793252 to your computer and use it in GitHub Desktop.
Save shriyaRam/af9e9f289566028ad86d6afb63793252 to your computer and use it in GitHub Desktop.
connect = '.col-4 > a'
await page.waitForSelector(connect)
connectlink = await page.$$eval(connect, am => am.filter(e => e.href).map(e => e.href))
await page.goto(connectlink[0]);
const num = await page.$eval('h1', el => el.innerText);
ans = num;
console.log(num);
connect = '.text-lg-right.mt-3 > a'
await page.waitForSelector(connect)
connectlink = await page.$$eval(connect, am => am.filter(e => e.href).map(e => e.href))
await page.goto(connectlink[0]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment