@letsscrapedata/controller 0.0.52 → 0.0.54
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 +2003 -130
- package/dist/index.d.cts +37 -23
- package/dist/index.d.ts +37 -23
- package/dist/index.js +2005 -132
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import EventEmitter from 'node:events';
|
|
2
|
-
import { Browser as Browser$1, BrowserContext as BrowserContext$1, ElementHandle, Frame as Frame$1, Page as Page$1, HTTPResponse, PuppeteerNode } from 'puppeteer';
|
|
3
2
|
import { Browser, BrowserContext, Locator, ElementHandle as ElementHandle$1, Frame, Page, Response, APIRequestContext, BrowserType, FrameLocator } from 'playwright';
|
|
3
|
+
import { Browser as Browser$1, BrowserContext as BrowserContext$1, ElementHandle, Frame as Frame$1, Page as Page$1, HTTPResponse } from 'puppeteer';
|
|
4
|
+
import { Browser as Browser$2, BrowserContext as BrowserContext$2, Locator as Locator$1, ElementHandle as ElementHandle$2, Frame as Frame$2, Page as Page$2, Response as Response$1, APIRequestContext as APIRequestContext$1, BrowserType as BrowserType$1 } from 'patchright';
|
|
4
5
|
import { Serializable } from 'node:child_process';
|
|
5
6
|
import { LogFunction } from '@letsscrapedata/utils';
|
|
6
7
|
import { Serializable as Serializable$1 } from 'child_process';
|
|
7
8
|
|
|
8
|
-
type BrowserControllerType = "puppeteer" | "
|
|
9
|
-
type AllBrowser = Browser | Browser$1;
|
|
10
|
-
type AllBrowserContext = BrowserContext | BrowserContext$1;
|
|
11
|
-
type AllElement = Locator | ElementHandle;
|
|
12
|
-
type AllElementHandle = ElementHandle$1 | ElementHandle;
|
|
13
|
-
type AllFrame = Frame | Frame$1;
|
|
14
|
-
type AllPage = Page | Page$1;
|
|
15
|
-
type AllResponse = Response | HTTPResponse;
|
|
16
|
-
type AllApiRequestContext = APIRequestContext;
|
|
9
|
+
type BrowserControllerType = "playwright" | "puppeteer" | "patchright";
|
|
10
|
+
type AllBrowser = Browser | Browser$1 | Browser$2;
|
|
11
|
+
type AllBrowserContext = BrowserContext | BrowserContext$1 | BrowserContext$2;
|
|
12
|
+
type AllElement = Locator | ElementHandle | Locator$1;
|
|
13
|
+
type AllElementHandle = ElementHandle$1 | ElementHandle | ElementHandle$2;
|
|
14
|
+
type AllFrame = Frame | Frame$1 | Frame$2;
|
|
15
|
+
type AllPage = Page | Page$1 | Page$2;
|
|
16
|
+
type AllResponse = Response | HTTPResponse | Response$1;
|
|
17
|
+
type AllApiRequestContext = APIRequestContext | APIRequestContext$1;
|
|
17
18
|
type CheerioNode = cheerio.Cheerio;
|
|
18
19
|
type BrowserCreationMethod = "launch" | "connect";
|
|
19
20
|
type BrowserContextCreationMethod = "launch" | "new";
|
|
@@ -94,6 +95,11 @@ interface PlaywrightBrowserTypes {
|
|
|
94
95
|
firefox: BrowserType;
|
|
95
96
|
webkit: BrowserType;
|
|
96
97
|
}
|
|
98
|
+
interface PatchrightBrowserTypes {
|
|
99
|
+
chromium: BrowserType$1;
|
|
100
|
+
firefox: BrowserType$1;
|
|
101
|
+
webkit: BrowserType$1;
|
|
102
|
+
}
|
|
97
103
|
interface BrowserOptions {
|
|
98
104
|
/**
|
|
99
105
|
* Interval between closing free pages (seconds) if greater than 0
|
|
@@ -300,6 +306,9 @@ interface PageExtInPuppeteer extends Page$1 {
|
|
|
300
306
|
interface PageExtInPlaywright extends Page {
|
|
301
307
|
pageInfo?: PageInfo;
|
|
302
308
|
}
|
|
309
|
+
interface PageExtInPatchright extends Page$2 {
|
|
310
|
+
pageInfo?: PageInfo;
|
|
311
|
+
}
|
|
303
312
|
interface FrameAddScriptTagOptions {
|
|
304
313
|
/**
|
|
305
314
|
* URL of the script to be added.
|
|
@@ -986,6 +995,7 @@ interface LsdPage extends EventEmitter {
|
|
|
986
995
|
pageInfo(): PageInfo;
|
|
987
996
|
pageWidth(): Promise<number>;
|
|
988
997
|
pdf(options?: PDFOptions): Promise<Buffer>;
|
|
998
|
+
reload(): Promise<boolean>;
|
|
989
999
|
screenshot(options?: ScreenshotOptions): Promise<Buffer>;
|
|
990
1000
|
scrollBy(x: number, y: number): Promise<boolean>;
|
|
991
1001
|
scrollTo(x: number, y: number): Promise<boolean>;
|
|
@@ -1177,15 +1187,15 @@ interface LsdBrowserController$1 {
|
|
|
1177
1187
|
*/
|
|
1178
1188
|
connect(browserControllerType: BrowserControllerType, browserType: LsdBrowserType, options?: LsdConnectOptions): Promise<LsdBrowser>;
|
|
1179
1189
|
/**
|
|
1180
|
-
*
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
*
|
|
1186
|
-
* @param
|
|
1190
|
+
* use special plugin, such as playwrightExtra.chromium.use(StealthPlugin()
|
|
1191
|
+
** import puppeteerExtra from "puppeteer-extra";
|
|
1192
|
+
** import * as playwrightExtra from "playwright-extra";
|
|
1193
|
+
** import StealthPlugin from "puppeteer-extra-plugin-stealth";
|
|
1194
|
+
* @param browserControllerType
|
|
1195
|
+
* @param browserType
|
|
1196
|
+
* @param plugin
|
|
1187
1197
|
*/
|
|
1188
|
-
|
|
1198
|
+
setBrowserPlugin(browserControllerType: BrowserControllerType, browserType: LsdBrowserType, plugin: any): boolean;
|
|
1189
1199
|
/**
|
|
1190
1200
|
* Create a new LsdApiContext, valid in playwright;
|
|
1191
1201
|
*/
|
|
@@ -1196,7 +1206,8 @@ declare function setControllerLogFun(logFun: LogFunction): boolean;
|
|
|
1196
1206
|
|
|
1197
1207
|
declare class PlaywrightBrowser extends EventEmitter implements LsdBrowser {
|
|
1198
1208
|
#private;
|
|
1199
|
-
|
|
1209
|
+
static doesSupport(browserType: LsdBrowserType): boolean;
|
|
1210
|
+
constructor(browser: Browser, browserType: LsdBrowserType, browserCreateMethod: BrowserCreationMethod, options: LsdLaunchOptions | LsdConnectOptions, browserIdx?: number, pid?: number);
|
|
1200
1211
|
newBrowserContext(options?: LsdBrowserContextOptions): Promise<LsdBrowserContext | null>;
|
|
1201
1212
|
close(): Promise<boolean>;
|
|
1202
1213
|
browserContexts(): LsdBrowserContext[];
|
|
@@ -1278,6 +1289,7 @@ declare class PlaywrightPage extends EventEmitter implements LsdPage {
|
|
|
1278
1289
|
pageInfo(): PageInfo;
|
|
1279
1290
|
pageWidth(): Promise<number>;
|
|
1280
1291
|
pdf(options?: PDFOptions | undefined): Promise<Buffer>;
|
|
1292
|
+
reload(): Promise<boolean>;
|
|
1281
1293
|
screenshot(options?: ScreenshotOptions): Promise<Buffer>;
|
|
1282
1294
|
scrollBy(x: number, y: number): Promise<boolean>;
|
|
1283
1295
|
scrollTo(x: number, y: number): Promise<boolean>;
|
|
@@ -1331,7 +1343,8 @@ declare class PlaywrightElement implements LsdElement {
|
|
|
1331
1343
|
|
|
1332
1344
|
declare class PuppeteerBrowser extends EventEmitter implements LsdBrowser {
|
|
1333
1345
|
#private;
|
|
1334
|
-
|
|
1346
|
+
static doesSupport(browserType: LsdBrowserType): boolean;
|
|
1347
|
+
constructor(browser: Browser$1, browserType: LsdBrowserType, browserCreateMethod: BrowserCreationMethod, options: LsdLaunchOptions | LsdConnectOptions, browserIdx?: number, pid?: number);
|
|
1335
1348
|
newBrowserContext(options?: LsdBrowserContextOptions | undefined): Promise<LsdBrowserContext | null>;
|
|
1336
1349
|
close(): Promise<boolean>;
|
|
1337
1350
|
browserContexts(): LsdBrowserContext[];
|
|
@@ -1413,6 +1426,7 @@ declare class PuppeteerPage extends EventEmitter implements LsdPage {
|
|
|
1413
1426
|
pageInfo(): PageInfo;
|
|
1414
1427
|
pageWidth(): Promise<number>;
|
|
1415
1428
|
pdf(options?: PDFOptions | undefined): Promise<Buffer>;
|
|
1429
|
+
reload(): Promise<boolean>;
|
|
1416
1430
|
screenshot(options?: ScreenshotOptions): Promise<Buffer>;
|
|
1417
1431
|
scrollBy(x: number, y: number): Promise<boolean>;
|
|
1418
1432
|
scrollTo(x: number, y: number): Promise<boolean>;
|
|
@@ -1506,6 +1520,7 @@ declare class CheerioPage extends EventEmitter implements LsdPage {
|
|
|
1506
1520
|
pageInfo(): PageInfo;
|
|
1507
1521
|
pageWidth(): Promise<number>;
|
|
1508
1522
|
pdf(): Promise<Buffer>;
|
|
1523
|
+
reload(): Promise<boolean>;
|
|
1509
1524
|
screenshot(): Promise<Buffer>;
|
|
1510
1525
|
scrollBy(): Promise<boolean>;
|
|
1511
1526
|
scrollTo(): Promise<boolean>;
|
|
@@ -1559,12 +1574,11 @@ declare class CheerioElement implements LsdElement {
|
|
|
1559
1574
|
declare class LsdBrowserController implements LsdBrowserController$1 {
|
|
1560
1575
|
#private;
|
|
1561
1576
|
constructor();
|
|
1562
|
-
|
|
1563
|
-
setPlaywrightBrowserType(browserType: LsdBrowserType, playwrightBrowserType: BrowserType | null): boolean;
|
|
1577
|
+
setBrowserPlugin(browserControllerType: BrowserControllerType, browserType: LsdBrowserType, plugin: any): boolean;
|
|
1564
1578
|
launch(browserControllerType: BrowserControllerType, browserType: LsdBrowserType, options: LsdLaunchOptions): Promise<LsdBrowser>;
|
|
1565
1579
|
connect(browserControllerType: BrowserControllerType, browserType: LsdBrowserType, options: LsdConnectOptions): Promise<LsdBrowser>;
|
|
1566
1580
|
newApiContext(options?: LsdApiContextOptions): Promise<LsdApiContext>;
|
|
1567
1581
|
}
|
|
1568
1582
|
declare const controller: LsdBrowserController;
|
|
1569
1583
|
|
|
1570
|
-
export { type AllApiRequestContext, type AllBrowser, type AllBrowserContext, type AllElement, type AllElementHandle, type AllFrame, type AllPage, type AllResponse, type BrowserContextCreationMethod, type BrowserContextRequirements, type BrowserContextStatus, type BrowserControllerType, type BrowserCreationMethod, type BrowserLaunchMethod, type BrowserStateData, CheerioElement, type CheerioNode, CheerioPage, type ClientCertificate, type CookieItem, type FrameAddScriptTagOptions, type GotoOptions, type IframeOption, type InputOptions, type KeyInput, type KeyPressOptions, type LocalStorageItem, type LocalStorageOrigin, type LowerCasePaperFormat, type LsdApiContext, type LsdApiContextOptions, type LsdApiResponse, type LsdBrowser, type LsdBrowserContext, type LsdBrowserContextOptions, type LsdBrowserController$1 as LsdBrowserController, type LsdBrowserType, type LsdConnectOptions, type LsdElement, type LsdFetchOptions, type LsdLaunchOptions, type LsdPage, type MouseClickOptions, type MouseClickType, type NavigationWaitUntil, type PDFMargin, type PDFOptions, type PageEvent, type PageExtInPlaywright, type PageExtInPuppeteer, type PageInfo, type PageOpenType, type PageStatus, type PaperFormat, PlaywrightBrowser, PlaywrightBrowserContext, type PlaywrightBrowserTypes, PlaywrightElement, PlaywrightPage, type ProxyInController, PuppeteerBrowser, PuppeteerBrowserContext, PuppeteerElement, PuppeteerPage, type RequestInterceptionAction, type RequestInterceptionOption, type RequestMatch, type RequestMethod, type RequestResourceType, type ResponseHandler, type ResponseHandlerOptions, type ResponseInterceptionItem, type ResponseInterceptionOption, type ResponseMatch, type ResponsePageData, type ScreenshotOptions, type SelectOptions, type UpdatablePageInfo, type ViewportSize, type WaitElementOptions, type WaitElementState, type WaitNavigationOptions, controller, setControllerLogFun };
|
|
1584
|
+
export { type AllApiRequestContext, type AllBrowser, type AllBrowserContext, type AllElement, type AllElementHandle, type AllFrame, type AllPage, type AllResponse, type BrowserContextCreationMethod, type BrowserContextRequirements, type BrowserContextStatus, type BrowserControllerType, type BrowserCreationMethod, type BrowserLaunchMethod, type BrowserStateData, CheerioElement, type CheerioNode, CheerioPage, type ClientCertificate, type CookieItem, type FrameAddScriptTagOptions, type GotoOptions, type IframeOption, type InputOptions, type KeyInput, type KeyPressOptions, type LocalStorageItem, type LocalStorageOrigin, type LowerCasePaperFormat, type LsdApiContext, type LsdApiContextOptions, type LsdApiResponse, type LsdBrowser, type LsdBrowserContext, type LsdBrowserContextOptions, type LsdBrowserController$1 as LsdBrowserController, type LsdBrowserType, type LsdConnectOptions, type LsdElement, type LsdFetchOptions, type LsdLaunchOptions, type LsdPage, type MouseClickOptions, type MouseClickType, type NavigationWaitUntil, type PDFMargin, type PDFOptions, type PageEvent, type PageExtInPatchright, type PageExtInPlaywright, type PageExtInPuppeteer, type PageInfo, type PageOpenType, type PageStatus, type PaperFormat, type PatchrightBrowserTypes, PlaywrightBrowser, PlaywrightBrowserContext, type PlaywrightBrowserTypes, PlaywrightElement, PlaywrightPage, type ProxyInController, PuppeteerBrowser, PuppeteerBrowserContext, PuppeteerElement, PuppeteerPage, type RequestInterceptionAction, type RequestInterceptionOption, type RequestMatch, type RequestMethod, type RequestResourceType, type ResponseHandler, type ResponseHandlerOptions, type ResponseInterceptionItem, type ResponseInterceptionOption, type ResponseMatch, type ResponsePageData, type ScreenshotOptions, type SelectOptions, type UpdatablePageInfo, type ViewportSize, type WaitElementOptions, type WaitElementState, type WaitNavigationOptions, controller, setControllerLogFun };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import EventEmitter from 'node:events';
|
|
2
|
-
import { Browser as Browser$1, BrowserContext as BrowserContext$1, ElementHandle, Frame as Frame$1, Page as Page$1, HTTPResponse, PuppeteerNode } from 'puppeteer';
|
|
3
2
|
import { Browser, BrowserContext, Locator, ElementHandle as ElementHandle$1, Frame, Page, Response, APIRequestContext, BrowserType, FrameLocator } from 'playwright';
|
|
3
|
+
import { Browser as Browser$1, BrowserContext as BrowserContext$1, ElementHandle, Frame as Frame$1, Page as Page$1, HTTPResponse } from 'puppeteer';
|
|
4
|
+
import { Browser as Browser$2, BrowserContext as BrowserContext$2, Locator as Locator$1, ElementHandle as ElementHandle$2, Frame as Frame$2, Page as Page$2, Response as Response$1, APIRequestContext as APIRequestContext$1, BrowserType as BrowserType$1 } from 'patchright';
|
|
4
5
|
import { Serializable } from 'node:child_process';
|
|
5
6
|
import { LogFunction } from '@letsscrapedata/utils';
|
|
6
7
|
import { Serializable as Serializable$1 } from 'child_process';
|
|
7
8
|
|
|
8
|
-
type BrowserControllerType = "puppeteer" | "
|
|
9
|
-
type AllBrowser = Browser | Browser$1;
|
|
10
|
-
type AllBrowserContext = BrowserContext | BrowserContext$1;
|
|
11
|
-
type AllElement = Locator | ElementHandle;
|
|
12
|
-
type AllElementHandle = ElementHandle$1 | ElementHandle;
|
|
13
|
-
type AllFrame = Frame | Frame$1;
|
|
14
|
-
type AllPage = Page | Page$1;
|
|
15
|
-
type AllResponse = Response | HTTPResponse;
|
|
16
|
-
type AllApiRequestContext = APIRequestContext;
|
|
9
|
+
type BrowserControllerType = "playwright" | "puppeteer" | "patchright";
|
|
10
|
+
type AllBrowser = Browser | Browser$1 | Browser$2;
|
|
11
|
+
type AllBrowserContext = BrowserContext | BrowserContext$1 | BrowserContext$2;
|
|
12
|
+
type AllElement = Locator | ElementHandle | Locator$1;
|
|
13
|
+
type AllElementHandle = ElementHandle$1 | ElementHandle | ElementHandle$2;
|
|
14
|
+
type AllFrame = Frame | Frame$1 | Frame$2;
|
|
15
|
+
type AllPage = Page | Page$1 | Page$2;
|
|
16
|
+
type AllResponse = Response | HTTPResponse | Response$1;
|
|
17
|
+
type AllApiRequestContext = APIRequestContext | APIRequestContext$1;
|
|
17
18
|
type CheerioNode = cheerio.Cheerio;
|
|
18
19
|
type BrowserCreationMethod = "launch" | "connect";
|
|
19
20
|
type BrowserContextCreationMethod = "launch" | "new";
|
|
@@ -94,6 +95,11 @@ interface PlaywrightBrowserTypes {
|
|
|
94
95
|
firefox: BrowserType;
|
|
95
96
|
webkit: BrowserType;
|
|
96
97
|
}
|
|
98
|
+
interface PatchrightBrowserTypes {
|
|
99
|
+
chromium: BrowserType$1;
|
|
100
|
+
firefox: BrowserType$1;
|
|
101
|
+
webkit: BrowserType$1;
|
|
102
|
+
}
|
|
97
103
|
interface BrowserOptions {
|
|
98
104
|
/**
|
|
99
105
|
* Interval between closing free pages (seconds) if greater than 0
|
|
@@ -300,6 +306,9 @@ interface PageExtInPuppeteer extends Page$1 {
|
|
|
300
306
|
interface PageExtInPlaywright extends Page {
|
|
301
307
|
pageInfo?: PageInfo;
|
|
302
308
|
}
|
|
309
|
+
interface PageExtInPatchright extends Page$2 {
|
|
310
|
+
pageInfo?: PageInfo;
|
|
311
|
+
}
|
|
303
312
|
interface FrameAddScriptTagOptions {
|
|
304
313
|
/**
|
|
305
314
|
* URL of the script to be added.
|
|
@@ -986,6 +995,7 @@ interface LsdPage extends EventEmitter {
|
|
|
986
995
|
pageInfo(): PageInfo;
|
|
987
996
|
pageWidth(): Promise<number>;
|
|
988
997
|
pdf(options?: PDFOptions): Promise<Buffer>;
|
|
998
|
+
reload(): Promise<boolean>;
|
|
989
999
|
screenshot(options?: ScreenshotOptions): Promise<Buffer>;
|
|
990
1000
|
scrollBy(x: number, y: number): Promise<boolean>;
|
|
991
1001
|
scrollTo(x: number, y: number): Promise<boolean>;
|
|
@@ -1177,15 +1187,15 @@ interface LsdBrowserController$1 {
|
|
|
1177
1187
|
*/
|
|
1178
1188
|
connect(browserControllerType: BrowserControllerType, browserType: LsdBrowserType, options?: LsdConnectOptions): Promise<LsdBrowser>;
|
|
1179
1189
|
/**
|
|
1180
|
-
*
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
*
|
|
1186
|
-
* @param
|
|
1190
|
+
* use special plugin, such as playwrightExtra.chromium.use(StealthPlugin()
|
|
1191
|
+
** import puppeteerExtra from "puppeteer-extra";
|
|
1192
|
+
** import * as playwrightExtra from "playwright-extra";
|
|
1193
|
+
** import StealthPlugin from "puppeteer-extra-plugin-stealth";
|
|
1194
|
+
* @param browserControllerType
|
|
1195
|
+
* @param browserType
|
|
1196
|
+
* @param plugin
|
|
1187
1197
|
*/
|
|
1188
|
-
|
|
1198
|
+
setBrowserPlugin(browserControllerType: BrowserControllerType, browserType: LsdBrowserType, plugin: any): boolean;
|
|
1189
1199
|
/**
|
|
1190
1200
|
* Create a new LsdApiContext, valid in playwright;
|
|
1191
1201
|
*/
|
|
@@ -1196,7 +1206,8 @@ declare function setControllerLogFun(logFun: LogFunction): boolean;
|
|
|
1196
1206
|
|
|
1197
1207
|
declare class PlaywrightBrowser extends EventEmitter implements LsdBrowser {
|
|
1198
1208
|
#private;
|
|
1199
|
-
|
|
1209
|
+
static doesSupport(browserType: LsdBrowserType): boolean;
|
|
1210
|
+
constructor(browser: Browser, browserType: LsdBrowserType, browserCreateMethod: BrowserCreationMethod, options: LsdLaunchOptions | LsdConnectOptions, browserIdx?: number, pid?: number);
|
|
1200
1211
|
newBrowserContext(options?: LsdBrowserContextOptions): Promise<LsdBrowserContext | null>;
|
|
1201
1212
|
close(): Promise<boolean>;
|
|
1202
1213
|
browserContexts(): LsdBrowserContext[];
|
|
@@ -1278,6 +1289,7 @@ declare class PlaywrightPage extends EventEmitter implements LsdPage {
|
|
|
1278
1289
|
pageInfo(): PageInfo;
|
|
1279
1290
|
pageWidth(): Promise<number>;
|
|
1280
1291
|
pdf(options?: PDFOptions | undefined): Promise<Buffer>;
|
|
1292
|
+
reload(): Promise<boolean>;
|
|
1281
1293
|
screenshot(options?: ScreenshotOptions): Promise<Buffer>;
|
|
1282
1294
|
scrollBy(x: number, y: number): Promise<boolean>;
|
|
1283
1295
|
scrollTo(x: number, y: number): Promise<boolean>;
|
|
@@ -1331,7 +1343,8 @@ declare class PlaywrightElement implements LsdElement {
|
|
|
1331
1343
|
|
|
1332
1344
|
declare class PuppeteerBrowser extends EventEmitter implements LsdBrowser {
|
|
1333
1345
|
#private;
|
|
1334
|
-
|
|
1346
|
+
static doesSupport(browserType: LsdBrowserType): boolean;
|
|
1347
|
+
constructor(browser: Browser$1, browserType: LsdBrowserType, browserCreateMethod: BrowserCreationMethod, options: LsdLaunchOptions | LsdConnectOptions, browserIdx?: number, pid?: number);
|
|
1335
1348
|
newBrowserContext(options?: LsdBrowserContextOptions | undefined): Promise<LsdBrowserContext | null>;
|
|
1336
1349
|
close(): Promise<boolean>;
|
|
1337
1350
|
browserContexts(): LsdBrowserContext[];
|
|
@@ -1413,6 +1426,7 @@ declare class PuppeteerPage extends EventEmitter implements LsdPage {
|
|
|
1413
1426
|
pageInfo(): PageInfo;
|
|
1414
1427
|
pageWidth(): Promise<number>;
|
|
1415
1428
|
pdf(options?: PDFOptions | undefined): Promise<Buffer>;
|
|
1429
|
+
reload(): Promise<boolean>;
|
|
1416
1430
|
screenshot(options?: ScreenshotOptions): Promise<Buffer>;
|
|
1417
1431
|
scrollBy(x: number, y: number): Promise<boolean>;
|
|
1418
1432
|
scrollTo(x: number, y: number): Promise<boolean>;
|
|
@@ -1506,6 +1520,7 @@ declare class CheerioPage extends EventEmitter implements LsdPage {
|
|
|
1506
1520
|
pageInfo(): PageInfo;
|
|
1507
1521
|
pageWidth(): Promise<number>;
|
|
1508
1522
|
pdf(): Promise<Buffer>;
|
|
1523
|
+
reload(): Promise<boolean>;
|
|
1509
1524
|
screenshot(): Promise<Buffer>;
|
|
1510
1525
|
scrollBy(): Promise<boolean>;
|
|
1511
1526
|
scrollTo(): Promise<boolean>;
|
|
@@ -1559,12 +1574,11 @@ declare class CheerioElement implements LsdElement {
|
|
|
1559
1574
|
declare class LsdBrowserController implements LsdBrowserController$1 {
|
|
1560
1575
|
#private;
|
|
1561
1576
|
constructor();
|
|
1562
|
-
|
|
1563
|
-
setPlaywrightBrowserType(browserType: LsdBrowserType, playwrightBrowserType: BrowserType | null): boolean;
|
|
1577
|
+
setBrowserPlugin(browserControllerType: BrowserControllerType, browserType: LsdBrowserType, plugin: any): boolean;
|
|
1564
1578
|
launch(browserControllerType: BrowserControllerType, browserType: LsdBrowserType, options: LsdLaunchOptions): Promise<LsdBrowser>;
|
|
1565
1579
|
connect(browserControllerType: BrowserControllerType, browserType: LsdBrowserType, options: LsdConnectOptions): Promise<LsdBrowser>;
|
|
1566
1580
|
newApiContext(options?: LsdApiContextOptions): Promise<LsdApiContext>;
|
|
1567
1581
|
}
|
|
1568
1582
|
declare const controller: LsdBrowserController;
|
|
1569
1583
|
|
|
1570
|
-
export { type AllApiRequestContext, type AllBrowser, type AllBrowserContext, type AllElement, type AllElementHandle, type AllFrame, type AllPage, type AllResponse, type BrowserContextCreationMethod, type BrowserContextRequirements, type BrowserContextStatus, type BrowserControllerType, type BrowserCreationMethod, type BrowserLaunchMethod, type BrowserStateData, CheerioElement, type CheerioNode, CheerioPage, type ClientCertificate, type CookieItem, type FrameAddScriptTagOptions, type GotoOptions, type IframeOption, type InputOptions, type KeyInput, type KeyPressOptions, type LocalStorageItem, type LocalStorageOrigin, type LowerCasePaperFormat, type LsdApiContext, type LsdApiContextOptions, type LsdApiResponse, type LsdBrowser, type LsdBrowserContext, type LsdBrowserContextOptions, type LsdBrowserController$1 as LsdBrowserController, type LsdBrowserType, type LsdConnectOptions, type LsdElement, type LsdFetchOptions, type LsdLaunchOptions, type LsdPage, type MouseClickOptions, type MouseClickType, type NavigationWaitUntil, type PDFMargin, type PDFOptions, type PageEvent, type PageExtInPlaywright, type PageExtInPuppeteer, type PageInfo, type PageOpenType, type PageStatus, type PaperFormat, PlaywrightBrowser, PlaywrightBrowserContext, type PlaywrightBrowserTypes, PlaywrightElement, PlaywrightPage, type ProxyInController, PuppeteerBrowser, PuppeteerBrowserContext, PuppeteerElement, PuppeteerPage, type RequestInterceptionAction, type RequestInterceptionOption, type RequestMatch, type RequestMethod, type RequestResourceType, type ResponseHandler, type ResponseHandlerOptions, type ResponseInterceptionItem, type ResponseInterceptionOption, type ResponseMatch, type ResponsePageData, type ScreenshotOptions, type SelectOptions, type UpdatablePageInfo, type ViewportSize, type WaitElementOptions, type WaitElementState, type WaitNavigationOptions, controller, setControllerLogFun };
|
|
1584
|
+
export { type AllApiRequestContext, type AllBrowser, type AllBrowserContext, type AllElement, type AllElementHandle, type AllFrame, type AllPage, type AllResponse, type BrowserContextCreationMethod, type BrowserContextRequirements, type BrowserContextStatus, type BrowserControllerType, type BrowserCreationMethod, type BrowserLaunchMethod, type BrowserStateData, CheerioElement, type CheerioNode, CheerioPage, type ClientCertificate, type CookieItem, type FrameAddScriptTagOptions, type GotoOptions, type IframeOption, type InputOptions, type KeyInput, type KeyPressOptions, type LocalStorageItem, type LocalStorageOrigin, type LowerCasePaperFormat, type LsdApiContext, type LsdApiContextOptions, type LsdApiResponse, type LsdBrowser, type LsdBrowserContext, type LsdBrowserContextOptions, type LsdBrowserController$1 as LsdBrowserController, type LsdBrowserType, type LsdConnectOptions, type LsdElement, type LsdFetchOptions, type LsdLaunchOptions, type LsdPage, type MouseClickOptions, type MouseClickType, type NavigationWaitUntil, type PDFMargin, type PDFOptions, type PageEvent, type PageExtInPatchright, type PageExtInPlaywright, type PageExtInPuppeteer, type PageInfo, type PageOpenType, type PageStatus, type PaperFormat, type PatchrightBrowserTypes, PlaywrightBrowser, PlaywrightBrowserContext, type PlaywrightBrowserTypes, PlaywrightElement, PlaywrightPage, type ProxyInController, PuppeteerBrowser, PuppeteerBrowserContext, PuppeteerElement, PuppeteerPage, type RequestInterceptionAction, type RequestInterceptionOption, type RequestMatch, type RequestMethod, type RequestResourceType, type ResponseHandler, type ResponseHandlerOptions, type ResponseInterceptionItem, type ResponseInterceptionOption, type ResponseMatch, type ResponsePageData, type ScreenshotOptions, type SelectOptions, type UpdatablePageInfo, type ViewportSize, type WaitElementOptions, type WaitElementState, type WaitNavigationOptions, controller, setControllerLogFun };
|