Get all links with XPath in Puppeteer (pausing or not working)?
问题 I am required to use XPaths to select all links on a page, for then my Puppeteer app to click into and perform some actions. I am finding that the method (code below) is getting stuck sometimes and my crawler will be paused. Is there a better/different way of getting all links from an XPath? Or is there something in my code that is incorrect and could be pausing my app's progress? try { links = await this.getLinksFromXPathSelector(state); } catch (e) { console.log("error getting links");