/** * 猎聘 CLI 通用工具函数 */ import { Page } from 'puppeteer-core'; /** 猎聘域名 */ export declare const LIEPIN_DOMAIN = "www.liepin.com"; export declare const LIEPIN_API = "https://api-c.liepin.com"; export declare const LIEPIN_LPT_API = "https://api-lpt.liepin.com"; export declare const LIEPIN_IM_API = "https://api-im.liepin.com"; /** 城市代码映射 */ export declare const CITY_CODES: Record; /** 工作经验代码 */ export declare const WORKYEAR_CODES: Record; /** 薪资代码 */ export declare const SALARY_CODES: Record; /** 年薪代码 */ export declare const YEARSALARY_CODES: Record; /** 学历代码 */ export declare const DEGREE_CODES: Record; /** 行业代码 */ export declare const INDUSTRY_CODES: Record; /** 公司规模代码 */ export declare const COMPSIZE_CODES: Record; /** 职位类型代码 */ export declare const JOBKIND_CODES: Record; /** 解析城市代码 */ export declare function resolveCity(city: string): string; /** 解析代码映射 */ export declare function resolveCode(value: string, codeMap: Record): string; /** 解析薪资 */ export declare function resolveSalary(salary: string): { low: string; high: string; }; /** 随机延迟 */ export declare function sleep(ms: number): Promise; /** 随机延迟(人类行为模拟) */ export declare function sleepRandom(min?: number, max?: number): Promise; /** 要求页面已初始化 */ export declare function requirePage(page: Page | null): asserts page is Page; /** 导航到猎聘页面 */ export declare function navigateTo(page: Page, path: string): Promise; /** 猎聘 API 请求 (api-c.liepin.com / 老 www.liepin.com 域) * * 与 lptFetch 行为对齐: * - try/catch, 不再裸抛 "Failed to fetch" * - 非 2xx 直接抛带状态码的错误 * - 非 JSON 响应抛"可能是反爬虫挑战" */ export declare function liepinFetch(page: Page, url: string, options?: RequestInit): Promise; /** 推荐候选人列定义 */ export declare const RECOMMEND_COLUMNS: { header: string; key: string; width: number; }[]; /** 人才列表列定义 */ export declare const TALENT_COLUMNS: { header: string; key: string; width: number; }[]; //# sourceMappingURL=utils.d.ts.map