- New: src/clis/bilibili/subtitle.ts - cascading BVID→CID→subtitle fetch using apiGet with automatic Wbi signature (w_rid) - Enhanced: src/explore.ts - added INTERACT_FUZZ_JS for interactive API discovery via simulated clicks (--auto flag) - Enhanced: src/explore.ts - empty-value score penalty for anti-bot detection - Fixed: src/main.ts - restored explore command syntax, added --auto option - Updated: CLI-CREATOR.md - cascading requests & anti-bot sections
27 lines
1.1 KiB
TypeScript
27 lines
1.1 KiB
TypeScript
/**
|
|
* Page interface: type-safe abstraction over Playwright MCP browser page.
|
|
*
|
|
* All pipeline steps and CLI adapters should use this interface
|
|
* instead of `any` for browser interactions.
|
|
*/
|
|
|
|
export interface IPage {
|
|
goto(url: string): Promise<void>;
|
|
evaluate(js: string): Promise<any>;
|
|
snapshot(opts?: { interactive?: boolean; compact?: boolean; maxDepth?: number; raw?: boolean }): Promise<any>;
|
|
click(ref: string): Promise<void>;
|
|
typeText(ref: string, text: string): Promise<void>;
|
|
pressKey(key: string): Promise<void>;
|
|
wait(options: number | { text?: string; time?: number; timeout?: number }): Promise<void>;
|
|
tabs(): Promise<any>;
|
|
closeTab(index?: number): Promise<void>;
|
|
newTab(): Promise<void>;
|
|
selectTab(index: number): Promise<void>;
|
|
networkRequests(includeStatic?: boolean): Promise<any>;
|
|
consoleMessages(level?: string): Promise<any>;
|
|
scroll(direction?: string, amount?: number): Promise<void>;
|
|
autoScroll(options?: { times?: number; delayMs?: number }): Promise<void>;
|
|
installInterceptor(pattern: string): Promise<void>;
|
|
getInterceptedRequests(): Promise<any[]>;
|
|
}
|