Skip to content

Instantly share code, notes, and snippets.

@swt02026
Created September 2, 2020 11:14
Show Gist options
  • Save swt02026/a23305b327dca3754398af048940a8a7 to your computer and use it in GitHub Desktop.
Save swt02026/a23305b327dca3754398af048940a8a7 to your computer and use it in GitHub Desktop.
const puppeteer = require('puppeteer');
for (const i of Array(50).keys()){
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto(`https://old.accupass.com/search/r/1/0/0/0/4/${i}/00010101/99991231`, {waitUntil: 'networkidle2'});
//await page.pdf({path: 'hn.pdf', format: 'A4'});
const all_of = await page.$$eval("h3", (nodes)=>nodes.map(node=>node.innerHTML));
console.log(all_of)
await browser.close();
})();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment