/** 类型定义 */ export declare type SerializedResponse = { status: number; content: string; }; export declare type ViewportDimensions = { width: number; height: number; }; export declare const MOBILE_USERAGENT = "Mozilla/5.0 (Linux; Android 8.0.0; Pixel 2 XL Build/OPD1.170816.004) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.75 Mobile Safari/537.36"; export declare type ErrorType = 'Forbidden' | 'NoResponse'; export declare class ScreenshotError extends Error { type: ErrorType; constructor(type: ErrorType); } export interface ParsedUrl { host: string; pathname: string; query: object; } export interface SpiderResult { url: string; parsedUrl: ParsedUrl; hash: string; resourceType?: string; method?: string; postData?: string | undefined; } /** 爬虫的响应结果 */ /** 爬虫的响应结果 */ export interface CrawlerResult { isFinished: boolean; metrics?: { executionDuration: number; spiderCount: number; depth: number; }; spiderMap?: { [key: string]: SpiderResult[]; }; }