VG
Size: a a a
VG
AP
SM
AP
VG
VG
page.on('response', async interceptedRequest => {
if (interceptedRequest.url().includes('blbla')) {
const body = await interceptedRequest.json();
console.log(body);
}
return interceptedRequest;
});
VG
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');
VG
.continue()
AP
page.on('request', async interceptedRequest => {
if (interceptedRequest.url().includes('blabla')) {
const body = await interceptedRequest.response()?.json();
console.log(body);
}
interceptedRequest.continue();
});
AP
AP
body
undefinedAP
/** A matching `Response` object, or `null` if the response has not been received yet. */
response(): Response | null;
AP
VG
AP
VG
AP
AP