unprint 0.19.17 → 0.19.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/app.js +6 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unprint",
3
- "version": "0.19.17",
3
+ "version": "0.19.18",
4
4
  "description": "Simplify common web scraping tasks while staying in control of the data.",
5
5
  "main": "src/app.js",
6
6
  "scripts": {
package/src/app.js CHANGED
@@ -1286,12 +1286,13 @@ async function getBrowserInstance(scope, options, useProxy = false, useRemote =
1286
1286
  }
1287
1287
 
1288
1288
  try {
1289
- const { browser, context } = await launchers;
1289
+ // const { browser, context } = await launchers;
1290
+ const { browser } = await launchers;
1290
1291
 
1291
- context.setDefaultNavigationTimeout(options.timeout);
1292
+ // context.setDefaultNavigationTimeout(options.timeout);
1292
1293
 
1293
1294
  client.browser = browser;
1294
- client.context = context;
1295
+ // client.context = context;
1295
1296
  } catch (error) {
1296
1297
  clients.delete(scopeKey);
1297
1298
 
@@ -1309,7 +1310,7 @@ async function closeAllBrowsers() {
1309
1310
  const closingClients = Array.from(clients.values());
1310
1311
 
1311
1312
  await Promise.all(closingClients.map(async (client) => {
1312
- await client.context.close();
1313
+ await client.context?.close();
1313
1314
  await client.browser.close();
1314
1315
 
1315
1316
  clients.delete(client.key);
@@ -1327,7 +1328,7 @@ async function closeBrowser(client, options = {}) {
1327
1328
  if (options.client === null // this browser is single-use
1328
1329
  || (client.retired && client.active === 0)) { // this browser is retired to minimize garbage build-up
1329
1330
  // this browser won't be reused, browser close DOES NOT automatically close context https://github.com/microsoft/playwright/issues/15163
1330
- await client.context.close();
1331
+ await client.context?.close();
1331
1332
  await client.browser.close();
1332
1333
 
1333
1334
  clients.delete(client.key);