|
|
@ -54,6 +54,10 @@ class PuppeteerBrowser extends Browser {
|
|
|
|
throw new Error(error.message || error.toString());
|
|
|
|
throw new Error(error.message || error.toString());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
browser.on('disconnected', () => {
|
|
|
|
|
|
|
|
throw new Error('Disconnected');
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const page = await browser.newPage();
|
|
|
|
const page = await browser.newPage();
|
|
|
|
|
|
|
|
|
|
|
@ -61,6 +65,10 @@ class PuppeteerBrowser extends Browser {
|
|
|
|
|
|
|
|
|
|
|
|
await page.setRequestInterception(true);
|
|
|
|
await page.setRequestInterception(true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
page.on('error', (error) => {
|
|
|
|
|
|
|
|
throw new Error(error.message || error.toString());
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
page.on('request', request => request.continue());
|
|
|
|
page.on('request', request => request.continue());
|
|
|
|
|
|
|
|
|
|
|
|
page.on('response', (response) => {
|
|
|
|
page.on('response', (response) => {
|
|
|
|