@letsscrapedata/controller 0.0.67 → 0.0.68
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/dist/index.cjs +7 -8
- package/dist/index.js +4 -5
- package/package.json +7 -6
package/dist/index.cjs
CHANGED
|
@@ -28,8 +28,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
30
|
// src/index.ts
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
33
|
CheerioElement: () => CheerioElement,
|
|
34
34
|
CheerioPage: () => CheerioPage,
|
|
35
35
|
ControllerEvent: () => ControllerEvent,
|
|
@@ -47,7 +47,7 @@ __export(src_exports, {
|
|
|
47
47
|
controller: () => controller,
|
|
48
48
|
setControllerLogFun: () => setControllerLogFun
|
|
49
49
|
});
|
|
50
|
-
module.exports = __toCommonJS(
|
|
50
|
+
module.exports = __toCommonJS(index_exports);
|
|
51
51
|
|
|
52
52
|
// src/types/types.ts
|
|
53
53
|
var ControllerEvent = /* @__PURE__ */ ((ControllerEvent2) => {
|
|
@@ -2198,7 +2198,7 @@ var PuppeteerElement = class _PuppeteerElement {
|
|
|
2198
2198
|
await this.#$ele.press(key, options);
|
|
2199
2199
|
return true;
|
|
2200
2200
|
}
|
|
2201
|
-
async screenshot(options) {
|
|
2201
|
+
async screenshot(options = {}) {
|
|
2202
2202
|
return await this.#$ele.screenshot(options);
|
|
2203
2203
|
}
|
|
2204
2204
|
async scrollIntoView() {
|
|
@@ -6292,7 +6292,7 @@ var CamoufoxPage = class extends import_node_events11.default {
|
|
|
6292
6292
|
#closeWhenFree;
|
|
6293
6293
|
#resquestInterceptionOptions;
|
|
6294
6294
|
#responseInterceptionOptions;
|
|
6295
|
-
#client;
|
|
6295
|
+
// #client: CDPSession | null;
|
|
6296
6296
|
#responseCb;
|
|
6297
6297
|
#isDebugTask;
|
|
6298
6298
|
#hasValidUrl(page) {
|
|
@@ -6562,7 +6562,6 @@ var CamoufoxPage = class extends import_node_events11.default {
|
|
|
6562
6562
|
this.#closeWhenFree = false;
|
|
6563
6563
|
this.#resquestInterceptionOptions = [];
|
|
6564
6564
|
this.#responseInterceptionOptions = [];
|
|
6565
|
-
this.#client = null;
|
|
6566
6565
|
this.#responseCb = null;
|
|
6567
6566
|
this.#isDebugTask = false;
|
|
6568
6567
|
loginfo(`##browser LsdPage ${this.#pageId} ${openType}ed`);
|
|
@@ -8027,8 +8026,8 @@ var LsdBrowserController = class _LsdBrowserController {
|
|
|
8027
8026
|
lsdBrowser = new PatchrightBrowser(browser, browserType, "launch", actOptions, this.#nextBrowserIdx++, browserPid);
|
|
8028
8027
|
}
|
|
8029
8028
|
} else if (browserControllerType === "puppeteer") {
|
|
8030
|
-
const
|
|
8031
|
-
const launchOptions = { headless, timeout,
|
|
8029
|
+
const pupBrowserType = this.#puppeteerProduct(browserType);
|
|
8030
|
+
const launchOptions = { headless, timeout, browser: pupBrowserType };
|
|
8032
8031
|
if (executablePath) {
|
|
8033
8032
|
launchOptions.executablePath = executablePath;
|
|
8034
8033
|
}
|
package/dist/index.js
CHANGED
|
@@ -2147,7 +2147,7 @@ var PuppeteerElement = class _PuppeteerElement {
|
|
|
2147
2147
|
await this.#$ele.press(key, options);
|
|
2148
2148
|
return true;
|
|
2149
2149
|
}
|
|
2150
|
-
async screenshot(options) {
|
|
2150
|
+
async screenshot(options = {}) {
|
|
2151
2151
|
return await this.#$ele.screenshot(options);
|
|
2152
2152
|
}
|
|
2153
2153
|
async scrollIntoView() {
|
|
@@ -6241,7 +6241,7 @@ var CamoufoxPage = class extends EventEmitter11 {
|
|
|
6241
6241
|
#closeWhenFree;
|
|
6242
6242
|
#resquestInterceptionOptions;
|
|
6243
6243
|
#responseInterceptionOptions;
|
|
6244
|
-
#client;
|
|
6244
|
+
// #client: CDPSession | null;
|
|
6245
6245
|
#responseCb;
|
|
6246
6246
|
#isDebugTask;
|
|
6247
6247
|
#hasValidUrl(page) {
|
|
@@ -6511,7 +6511,6 @@ var CamoufoxPage = class extends EventEmitter11 {
|
|
|
6511
6511
|
this.#closeWhenFree = false;
|
|
6512
6512
|
this.#resquestInterceptionOptions = [];
|
|
6513
6513
|
this.#responseInterceptionOptions = [];
|
|
6514
|
-
this.#client = null;
|
|
6515
6514
|
this.#responseCb = null;
|
|
6516
6515
|
this.#isDebugTask = false;
|
|
6517
6516
|
loginfo(`##browser LsdPage ${this.#pageId} ${openType}ed`);
|
|
@@ -7976,8 +7975,8 @@ var LsdBrowserController = class _LsdBrowserController {
|
|
|
7976
7975
|
lsdBrowser = new PatchrightBrowser(browser, browserType, "launch", actOptions, this.#nextBrowserIdx++, browserPid);
|
|
7977
7976
|
}
|
|
7978
7977
|
} else if (browserControllerType === "puppeteer") {
|
|
7979
|
-
const
|
|
7980
|
-
const launchOptions = { headless, timeout,
|
|
7978
|
+
const pupBrowserType = this.#puppeteerProduct(browserType);
|
|
7979
|
+
const launchOptions = { headless, timeout, browser: pupBrowserType };
|
|
7981
7980
|
if (executablePath) {
|
|
7982
7981
|
launchOptions.executablePath = executablePath;
|
|
7983
7982
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@letsscrapedata/controller",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.68",
|
|
4
4
|
"description": "Unified browser / HTML controller interfaces that support patchright, camoufox, playwright, puppeteer and cheerio",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -52,15 +52,16 @@
|
|
|
52
52
|
"camoufox-js-lsd": "^0.6.5",
|
|
53
53
|
"cheerio": "^1.0.0",
|
|
54
54
|
"patchright": "^1.52.5",
|
|
55
|
-
"playwright": "^1.
|
|
55
|
+
"playwright": "^1.54.2",
|
|
56
56
|
"playwright-extra": "^4.3.6",
|
|
57
|
-
"puppeteer": "^
|
|
57
|
+
"puppeteer": "^24.16.0",
|
|
58
58
|
"puppeteer-extra": "^3.3.6",
|
|
59
|
-
"puppeteer-extra-plugin-stealth": "^2.11.2"
|
|
59
|
+
"puppeteer-extra-plugin-stealth": "^2.11.2",
|
|
60
|
+
"utils": "^0.3.1"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
63
|
"@types/cheerio": "^0.22.35",
|
|
63
|
-
"tsup": "^8.0
|
|
64
|
-
"typescript": "^5.
|
|
64
|
+
"tsup": "^8.5.0",
|
|
65
|
+
"typescript": "^5.9.2"
|
|
65
66
|
}
|
|
66
67
|
}
|