unprint 0.19.13 → 0.19.14
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/README.md +1 -1
- package/package.json +1 -1
- package/src/app.js +5 -12
package/README.md
CHANGED
|
@@ -299,7 +299,7 @@ You can run unprint as a Playwright browser server. This is particularly useful
|
|
|
299
299
|
|
|
300
300
|
#### Server
|
|
301
301
|
* Ensure optional dependencies are installed
|
|
302
|
-
* `npm
|
|
302
|
+
* `npm run server` or `node src/server.js`
|
|
303
303
|
|
|
304
304
|
Environment variables (optional, .env is supported):
|
|
305
305
|
* `UNPRINT_HOST`: Server host, default `127.0.0.1:3333`
|
package/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -1434,18 +1434,11 @@ async function browserRequest(url, customOptions = {}) {
|
|
|
1434
1434
|
|
|
1435
1435
|
const page = await client.context.newPage();
|
|
1436
1436
|
|
|
1437
|
-
await page.
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
...headers,
|
|
1443
|
-
'user-agent': options.browserUserAgent || options.userAgent,
|
|
1444
|
-
...options.headers,
|
|
1445
|
-
cookie: getCookie(options),
|
|
1446
|
-
}, options),
|
|
1447
|
-
});
|
|
1448
|
-
});
|
|
1437
|
+
await page.setExtraHttpHeaders(curateHeaders({
|
|
1438
|
+
'user-agent': options.browserUserAgent || options.userAgent,
|
|
1439
|
+
...options.headers,
|
|
1440
|
+
cookie: getCookie(options),
|
|
1441
|
+
}, options));
|
|
1449
1442
|
|
|
1450
1443
|
const res = await page.goto(url, {
|
|
1451
1444
|
...options.page,
|