Created
June 22, 2020 14:49
-
-
Save shriyaRam/1698e40700b50374b8e89dfae277fe8c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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