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