# boss_requirement **Repository Path**: co-code/boss_requirement ## Basic Information - **Project Name**: boss_requirement - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-03-29 - **Last Updated**: 2026-03-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # BOSS 直聘岗位需求提取 CLI > 提醒:仅用于你有合法访问权限的页面,不绕过登录。 ## 安装 ```bash npm install npx playwright install ``` ## 编译 ```bash npm run build ``` ## 运行 第一次运行(需要手动登录一次,会保存登录态到 `storage.json`): ```bash node dist/index.js "https://www.zhipin.com/job_detail/xxxx.html" ``` 之后再次运行(会启动浏览器通过安全校验,建议加 `--headless` 提速): ```bash node dist/index.js "https://www.zhipin.com/job_detail/xxxx.html" --headless ``` 指定输出文件: ```bash node dist/index.js "https://www.zhipin.com/job_detail/xxxx.html" -o output.txt ``` ## 参数 - `-o, --out ` 输出文件,默认 `job-requirements.txt` - `-s, --storage ` 登录态文件,默认 `storage.json` - `--headless` 无头模式(首次登录建议不用该参数) - `--timeout ` 超时,默认 `45000` ## 说明 - 直接 HTTP 请求会触发安全校验页,因此后续也需要通过浏览器加载页面。 - 只解析页面中的 `.job-sec-text` 区块作为岗位需求(自动处理 `
` 换行)。 - 页面结构变动时,可能需要微调提取逻辑。