I was wanting to look into Puppeteer a while back, today I found this on their site:
How to intercept an HTTP request in Puppeteer
const puppeteer = require('puppeteer'); (async () => { const browser = await puppeteer.launch(); const page = await browser.newPage(); await page.setRequestInterception(true); page.on('request', interceptedRequest => { if (interceptedRequest.url().endsWith('.png') || interceptedRequest.url().endsWith('.jpg')) interceptedRequest.abort(); else interceptedRequest.continue(); }); await page.goto('https://example.com'); await browser.close(); })();
They too can intercept inbound and outbound requests ✔️ I don't know yet if the data can be changed, but the workflow can be altered.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I was wanting to look into Puppeteer a while back, today I found this on their site:
How to intercept an HTTP request in Puppeteer
They too can intercept inbound and outbound requests ✔️
I don't know yet if the data can be changed, but the workflow can be altered.