Skip to content

Instantly share code, notes, and snippets.

@shriyaRam
Created June 22, 2020 14:49
Show Gist options
  • Save shriyaRam/1698e40700b50374b8e89dfae277fe8c to your computer and use it in GitHub Desktop.
Save shriyaRam/1698e40700b50374b8e89dfae277fe8c to your computer and use it in GitHub Desktop.
await page.goto(req.body.sigspace);
await page.type('#company_email', req.body.login);
await page.type('#company_password', req.body.pass);
await page.keyboard.press('Enter').then(async () => { await page.waitForNavigation({waitUntil: 'load'})}).catch(()=>{console.log("Couldn't log in")});
const selector = '.col-4 > a'
await page.waitForSelector(selector)
const links = await page.$$eval(selector, am => am.filter(e => e.href).map(e => e.href))
console.log(links);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment