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
// Available functions : | |
// | |
// page : https://pptr.dev/#?product=Puppeteer&version=v8.0.0&show=api-class-page | |
// Custom | |
// scrollToBottom | |
// scrollToSelector | |
await scrollToBottom(page); | |
await page.waitForSelector('iframe#dsq-app2953') | |
await scrollToBottom(page); |
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
// https://www.npmjs.com/package/node-html-parser | |
// htmlRoot gets injected and is available to your script | |
// Helper Functions: | |
// select:removeWhitespace().text & el.attributes.content | |
// selectAll: same as above | |
const result = [] | |
const list = Array.from(htmlRoot.querySelectorAll(':is(.AdvItemBox,.FreeListingItemBox)')) | |
for (const el of list) { | |
const isAd = !!el.querySelector('.AdvDetailsArea') |