tianyancha-bidding-collector

v1.0.4

天眼查招投标数据查询工具 - 基于浏览器自动化技术批量查询企业招投标/中标公示信息,导出结构化 CSV 报表。支持 macOS 和 Windows 跨平台运行。

2· 129·0 current·0 all-time
byairs-git@airs-guest

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for airs-guest/tianyancha-bidding-collector.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "tianyancha-bidding-collector" (airs-guest/tianyancha-bidding-collector) from ClawHub.
Skill page: https://clawhub.ai/airs-guest/tianyancha-bidding-collector
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install tianyancha-bidding-collector

ClawHub CLI

Package manager switcher

npx clawhub@latest install tianyancha-bidding-collector
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description describe automated browser scraping of Tianyancha bidding data; the package.json, puppeteer-core dependency, and scripts (browser connection, search, download, CSV/Excel utilities) are appropriate and expected for this functionality.
Instruction Scope
SKILL.md and scripts require the user to start Chrome with remote-debugging on port 9222 and to log in manually to Tianyancha; scripts then drive that browser to search and scrape pages. This stays within the declared purpose, but it implies the skill will interact with your logged-in browser session and wait for manual captcha/login resolution. Be aware that exposing a Chrome remote-debugging port can expose the profile to local network processes while it's open; the skill does not itself open external network endpoints or exfiltrate data in the code provided.
Install Mechanism
There is no platform install spec in the registry; the README/SKILL.md instructs the user to run npm install in scripts/, and a package-lock is included. Npm dependencies (puppeteer-core, xlsx, csv-writer, winston, etc.) will be fetched from a registry (package-lock references a mirror). This is expected for a Node-based scraper but carries the usual moderate risk of installing many third-party npm packages — review package.json and lockfile and consider installing in an isolated environment.
Credentials
The skill requests no environment variables, credentials, or unusual config paths. It requires a user-provided Tianyancha account (logged in manually in Chrome) which is appropriate for scraping a site requiring authentication. No unrelated secrets are requested.
Persistence & Privilege
The skill does not request 'always: true', does not modify other skills, and only writes output and logs under its own SKILL_DIR/data path. Its runtime writes files and saves progress within its own project directory, which is normal for this type of tool.
Assessment
This skill appears to do what it claims (browse Tianyancha with Puppeteer and export CSVs). Points to consider before installing/running: - npm install will fetch and install many third-party packages (including puppeteer-core). If you have security concerns, inspect package.json/package-lock and run npm install in an isolated environment (container/VM) or review packages for postinstall scripts. - The tool requires you to start Chrome with --remote-debugging-port=9222 and to log in to Tianyancha in that browser profile. While running, the debugging port exposes the browser to local connections; run it with a dedicated temporary user-data-dir (as the docs show) and avoid using your primary browser profile or accounts with sensitive sessions. - The scripts will drive your logged-in browser and may wait for you to solve CAPTCHAs or login prompts; they do not send scraped data to remote endpoints in the provided code — scraped data is saved to SKILL_DIR/data/*.csv and tool.log. - Ensure you comply with Tianyancha's terms of service and local laws regarding automated scraping and use of scraped data. If you want additional assurance, ask for a brief audit of package.json/package-lock or run the tool first in an isolated VM and confirm there are no unexpected network calls or lifecycle scripts during npm install.

Like a lobster shell, security has layers — review code before you run it.

latestvk97en6217xd6kmygskkczr9t3583z54f
129downloads
2stars
5versions
Updated 3w ago
v1.0.4
MIT-0

Skill 目录结构

<SKILL_DIR>/tianyancha-bidding-collector/
├── SKILL.md
├── assets/
│   └── 具身智能中游企业数据库.md        # 默认企业名单
├── scripts/
│   ├── package.json                   # npm 依赖声明(在此目录执行 npm install)
│   ├── settings.json                  # 浏览器与采集配置

│   ├── step1_search_companies.js      # 企业搜索确认
│   ├── step2_download_bidding.js      # 招投标下载
│   ├── browser.js                     # Puppeteer 浏览器连接
│   ├── modules/
│   │   ├── parseCompanyList.js        # MD 企业名单解析
│   │   ├── companySearch.js           # 天眼查企业搜索
│   │   └── biddingDownload.js         # 招投标记录下载
│   └── utils/
│       ├── excel.js                   # CSV/Excel 读写
│       ├── logger.js                  # 日志(Winston)
│       └── retry.js                   # 重试与等待
└── data/                              # 运行时输出(自动创建)

SKILL_DIR 解析规则(按优先级):

优先级macOS / LinuxWindows
1~/.qclaw/skills/tianyancha-bidding-collector%USERPROFILE%\.qclaw\skills\tianyancha-bidding-collector
2~/.openclaw/skills/tianyancha-bidding-collector%USERPROFILE%\.openclaw\skills\tianyancha-bidding-collector

取第一个存在的路径作为 SKILL_DIR。

When to Use

当用户需要以下场景时触发此技能:

  • 查询、导出企业在天眼查平台上的招投标/中标/投标公示信息
  • 批量查询一批企业的招投标历史记录
  • 按时间范围和金额筛选企业中标信息
  • 基于企业名单文件进行招投标数据查询

Execution Logic

Step 1: 前置环境检查(跨平台)

1.1 检测操作系统

node -e "console.log(process.platform)"

1.2 Node.js 环境检测与自动安装

首先检测 Node.js 是否已安装:

node --version
npm --version

如未安装 Node.js:

请访问 Node.js 官网下载安装:https://nodejs.org/ (建议安装 LTS 版本)

验证安装:

node --version  # 应显示 v18 或更高版本
npm --version

1.3 Chrome 环境检查

脚本会检测 Chrome 远程调试端口(9222)是否已开启。

⚠️ 用户需手动启动 Chrome:

请先关闭所有 Chrome 窗口,然后按您的操作系统运行以下命令:

macOS:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome_debug_profile

Windows:

"C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir=%TEMP%\chrome_debug_profile

Linux:

google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome_debug_profile

提示:如果 Chrome 安装在其他位置,请修改命令中的路径。

登录天眼查: Chrome 启动后,请手动在浏览器中打开 https://www.tianyancha.com 并完成登录。

登录完成后,告知我"已登录",我将继续执行后续步骤。

安装 npm 依赖:

cd SKILL_DIR/scripts && npm install

Step 2: 参数提取

从用户 prompt 中提取以下参数(均有默认值):

参数说明默认值
公司列表文本内容或 .md 文件路径assets/具身智能中游企业数据库.md
开始日期查询时间范围起点当季度第一天
结束日期查询时间范围终点今天
最低金额万元,0=无门槛0

当季度计算:Q1=01-0103-31, Q2=04-0106-30, Q3=07-0109-30, Q4=10-0112-31。

如果用户直接提供了公司名称列表(非文件),将公司列表写入 SKILL_DIR/data/custom_companies.md

| 索引 | 企业名称 | 所属领域 | 产品名称 | 城市 |
| --- | --- | --- | --- | --- |
| 1 | 公司A | - | - | - |
| 2 | 公司B | - | - | - |

然后使用 --company-file 指向该文件。

Step 3: 企业搜索确认

cd SKILL_DIR/scripts

# 使用内置默认企业名单
node step1_search_companies.js

# 使用自定义企业名单
node step1_search_companies.js --company-file SKILL_DIR/data/custom_companies.md

执行完成后,读取 SKILL_DIR/data/company_list.csv,向用户报告:

  • 已确认的企业数
  • 未找到的企业及名称
  • 失败的企业及原因

Step 4: 招投标记录下载

cd SKILL_DIR/scripts
node step2_download_bidding.js --start-date 2026-01-01 --end-date 2026-03-31 --min-amount 0

执行完成后,读取 SKILL_DIR/data/bidding_records.csv,输出结构化摘要:

  • 有招投标记录的企业数量
  • 总记录数
  • 按企业分组的记录统计
  • 金额 TOP 10 记录列表(如有金额信息)
  • 失败企业列表

异常处理

异常场景处理方式
Chrome 未连接 / 端口 9222 无响应提示用户按文档手动启动 Chrome
需要验证码提醒用户在 Chrome 窗口中手动完成验证码,完成后工具会自动继续
企业搜索无结果说明可能原因:企业名称不准确、非大陆企业、天眼查未收录
招投标无记录说明可能原因:该企业在指定时间范围内无公开招投标、金额门槛过高
npm 依赖缺失引导用户在 SKILL_DIR/scripts 下执行 npm install
CSV 文件不存在检查上一步骤是否正常完成

Expected Output

输出格式1:企业搜索确认报告

企业搜索完成:共 50 家国内企业
  已确认: 45 家
  未找到: 3 家(企业A、企业B、企业C)
  失败: 2 家(企业D: 网络超时、企业E: 页面异常)

输出格式2:招投标记录摘要

招投标记录下载完成
  时间范围: 2026-01-01 至 2026-03-31
  金额门槛: 无门槛
  有记录企业: 28 / 45 家
  符合条件记录: 156 条

  按企业分布:
    企业A: 12 条
    企业B: 8 条
    ...

  金额 TOP 5:
    1. 企业A - XX项目 - 500万元
    2. 企业B - YY项目 - 320万元
    ...

输出文件

文件路径说明
企业列表SKILL_DIR/data/company_list.csv企业搜索确认结果
招投标记录SKILL_DIR/data/bidding_records.csv招投标记录明细
断点进度SKILL_DIR/data/step2_progress.jsonStep 2 断点续传进度

Judgment Criteria

  • 企业搜索确认率 > 90% 为正常,低于此值需检查名单质量
  • 有招投标记录的企业占比通常在 40%-70%,取决于行业和时间范围
  • 单次查询建议不超过 200 家企业,避免触发平台安全机制
  • 时间范围建议不超过 1 年,数据量过大时可分季度采集
  • 如遇安全验证频率过高(>5次/50家),建议暂停 30 分钟后继续

Comments

Loading comments...