Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(const sect of sections ){
- // Now collect all the URLs
- const appUrls = await page.$$eval('div.main > ul.app-list > li > div.app-info a.app-info-icon', links => links.map(link => link.href));
- // Visit each URL one by one and collect the data
- for (let appUrl of appUrls) {
- var count = i++;
- try{
- await page.goto(appUrl);
- const appName = await page.$eval('div.det-name-int', div => div.innerText.trim());
- console.log('n' + count);
- console.log(appName);
- } catch(e){
- console.log('n' + count);
- console.log('ERROR');
- await page.reload();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement