CA
fascinating-indigo
Finishing requestHandler() request early
Im using Puppeteer requestHandler() and is there a way for me to end the request early instead of waiting for the whole "script" to finish so I could move on to the next URL in the queue?
3 Replies
Hello @liutc, not sure what you mean exactly.
You may end processing the request from inside of the script, just by returning a
void
.
fascinating-indigoOP•3y ago
Understood, I was doing page.close() and browser.close()
Basically on the page I have a setInterval function that checks for page changes every second, if in 10 seconds the "change" that Im looking for doesn't appear I just want to close the current session and move on to the next request in the queue 🙂
If it is everything that the routerHandler do, then the implementation could be something simple like: