标签:smi abort await tps row tee ons || edr
const puppeteer = require(‘puppeteer‘);
puppeteer.launch().then(async browser => {
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();
});
标签:smi abort await tps row tee ons || edr
原文地址:https://www.cnblogs.com/justart/p/9746747.html