unprint 0.19.10 → 0.19.11
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.
- package/package.json +1 -1
- package/src/app.js +5 -3
package/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -16,8 +16,8 @@ const srcset = require('srcset');
|
|
|
16
16
|
const settings = {
|
|
17
17
|
throwErrors: false,
|
|
18
18
|
logErrors: true,
|
|
19
|
-
requestTimeout: 30000,
|
|
20
19
|
userAgent: 'unprint',
|
|
20
|
+
timeout: 60_000,
|
|
21
21
|
remote: {
|
|
22
22
|
enable: false,
|
|
23
23
|
address: 'ws://127.0.0.1:3333/browser',
|
|
@@ -1283,6 +1283,8 @@ async function getBrowserInstance(scope, options, useProxy = false, useRemote =
|
|
|
1283
1283
|
try {
|
|
1284
1284
|
const { browser, context } = await launchers;
|
|
1285
1285
|
|
|
1286
|
+
context.setDefaultNavigationTimeout(options.timeout);
|
|
1287
|
+
|
|
1286
1288
|
client.browser = browser;
|
|
1287
1289
|
client.context = context;
|
|
1288
1290
|
} catch (error) {
|
|
@@ -1385,7 +1387,7 @@ function useRemoteRequest(options) {
|
|
|
1385
1387
|
|
|
1386
1388
|
async function browserRequest(url, customOptions = {}) {
|
|
1387
1389
|
const options = merge.all([{
|
|
1388
|
-
timeout:
|
|
1390
|
+
timeout: 60000,
|
|
1389
1391
|
extract: true,
|
|
1390
1392
|
client: 'main',
|
|
1391
1393
|
limiter: 'browser',
|
|
@@ -1578,7 +1580,7 @@ async function request(url, customOptions = {}, redirects = 0) {
|
|
|
1578
1580
|
method: 'get',
|
|
1579
1581
|
body: null,
|
|
1580
1582
|
interface: 'fetch', // fetch or request
|
|
1581
|
-
timeout:
|
|
1583
|
+
timeout: 60000,
|
|
1582
1584
|
extract: true,
|
|
1583
1585
|
followRedirects: true,
|
|
1584
1586
|
maxRedirects: 3,
|