Tianyancha New Automated Enterprise Inquiry: Added and Push to WeCom on Region-based Monitoring Page

Preface

When conducting investment promotion, competitor tracking, or local enterprise intelligence, you often need to monitor the Tianyancha “Newly Added Enterprises” list. Manually refreshing the page, cross-referencing with yesterday’s list, and copying data to IM to sync with colleagues is slow and prone to omissions. The Open Platform API allows for structured data retrieval but requires separate applications, integration, and billing; pure web crawlers require maintenance of login states and page structures.

The following introduces the SkillHub community Skill “Tianyancha New Enterprise Auto Query” (Coordinate @user_65867666/tianyancha-region-monitor). It follows a route of “Tianyancha page already open in browser + scheduled task”: scraping the DOM of the current page, filtering newly added enterprises by configured regions, deduplicating against local snapshots, and pushing notifications via WeCom (Enterprise WeChat) bot webhook. It is suitable for teams that already have access to the Tianyancha Professional Edition page and wish to orchestrate monitoring via an Agent.

What is this

“Tianyancha New Enterprise Auto Query” is a community Skill (source: community) listed on SkillHub by publisher user_65867666. The current version is 1.0.0, categorized as data-analysis, with subcategories including “Web Scraping” and “Competitor Analysis”. The metadata name within the Skill package is tianyancha-page-monitor, which differs from the store display name. For installation and reference, the coordinate @user_65867666/tianyancha-region-monitor shall prevail.

The SkillHub page labels requires_api_key=true, but the actual runtime dependencies are environment variables (WeCom webhook, Tianyancha page URL, target regions, etc.). These must be configured in the runtime environment before use, rather than relying on a single vendor API Key field.

As of the SkillHub page data: approximately 5227 downloads and 20 installations; conclusions from Tencent Keen Security Lab and Sanbu Security Scan are both “Safe, No Risk” (subject to the display on the store page).

Core Functions

The following capabilities are derived from SKILL.md and page_monitor.py within the Skill package and can be verified after installation.

  1. Page Monitoring: Obtains HTML from the current browser page via the agent-browser within the OpenClaw system, or executes a visit/refresh on the default Tianyancha “New Enterprise” address (default https://pro.tianyancha.com/app/newCompany, can be overridden via TIANYANCHA_PAGE_URL).
  2. Region Filtering: Parses the enterprise list from the HTML and filters by TARGET_REGIONS; if not configured, the script defaults to ["松江区", "嘉定区"].
  3. Deduplication and Increment: Writes enterprise IDs (prioritizing Unified Social Credit Codes, otherwise names) to the local page_snapshot.json. It compares this with the previous snapshot and triggers push notifications only for new entries.
  4. WeCom Notification: Sends markdown messages (msgtype: markdown) to WECOM_WEBHOOK_URL.
  5. Scheduling Suggestion: SKILL.md suggests the cron expression */5 * * * * (every 5 minutes), which aligns with the description of “refresh every 5 minutes”.

Dependencies: Python >=3.7, pip packages requests, beautifulsoup4, openclaw-tools (or via OpenClaw’s built-in browser tools).

Installation and Activation

Install SkillHub CLI

If the CLI is not installed, check or install it according to the SkillHub official installation documentation:

command -v skillhub && skillhub --version

If not installed (CLI only):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only

Install this Skill

When installing, you must use --dir to point to the current Agent’s skills directory; otherwise, it defaults to ./skills/ and may not be recognized. The AI installation prompt provided by the official page is: Install @user_65867666/tianyancha-region-monitor according to https://skillhub.cn/install/skillhub.md.

Command line example (replace <skills directory> with the corresponding path in your environment):

skillhub install @user_65867666/tianyancha-region-monitor --dir <skills directory>

Common Agent skills directories (excerpt from SkillHub installation documentation):

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

After installation, instruct the Agent to read the SKILL.md inside the Skill package to orchestrate tasks according to the instructions; if the environment requires a restart or reloading of skills, follow the conventions of the client you are using.

Environment Variables Before Running

Configure before running page_monitor.py or equivalent workflows:

Variable Description
WECOM_WEBHOOK_URL WeCom bot webhook, required for push notifications
TIANYANCHA_PAGE_URL Tianyancha “New Enterprise” page URL, optional
TARGET_REGIONS JSON array string, e.g., ["松江区", "嘉定区"], optional

Example:

export WECOM_WEBHOOK_URL="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY"
export TIANYANCHA_PAGE_URL="https://pro.tianyancha.com/app/newCompany"
export TARGET_REGIONS='["松江区", "嘉定区"]'

Python dependency installation example:

pip install "requests>=2.25.0" "beautifulsoup4>=4.12.0" "openclaw-tools>=0.1.0"

Typical Usage

Set up the environment and dependencies first, then configure scheduled tasks as suggested by the Skill.

  1. Verify Browser Capabilities: The script reads the already opened page via agent-browser snapshot --format html; if that fails, it attempts agent-browser visit <TIANYANCHA_PAGE_URL> --html. Ensure OpenClaw / agent-browser is available, and the Tianyancha page is logged in and can open the “Apps > New Enterprise” module.
  2. Manual Test Run (in the Skill directory):
python page_monitor.py

The workflow is: Fetch HTML → Parse and filter by region → Compare with page_snapshot.json → POST to WeCom if new enterprises are found → Update snapshot.
3. Scheduled Execution: According to the cron_suggestion in SKILL.md, configure the execution of the above command every 5 minutes on the host machine or task platform, or have the Agent orchestrate the equivalent logic based on the Skill instructions.

DOM selectors in page_monitor.py are marked as needing adjustment based on the actual structure of Tianyancha Professional Edition (e.g., .company-list-item); if the page layout changes, selectors need maintenance, otherwise parsing will result in empty output.

Applicable Scenarios and Notes

Who it is for

  • Those who already have stable access to the Tianyancha Professional Edition “New Enterprise” page and wish to automatically discover increments by district (default can be changed to other districts).
  • Teams already using WeCom bots for internal notifications and wanting to push new enterprise lists to group chats.
  • Those using OpenClaw or Agent environments compatible with agent-browser who are willing to delegate monitoring steps to an AI using Skill standards.

Limitations and Notes

  • This is a page monitoring solution, not an official Tianyancha Open Platform API; compliance, account permissions, and page ToS must be assessed by yourself.
  • The requires_api_key tag is true on the store side, but the actual implementation relies on environment variables like webhook and page URLs; do not confuse this with Open Platform tokens.
  • The deduplication file page_snapshot.json is generated in the script’s working directory; switching machines or clearing files will cause enterprises in the historical list to be pushed again.
  • The page_monitor.py in the repository calls format_markdown_message when new enterprises are found. The current package does not provide the implementation of this function. You need to complete the message template yourself or have the Agent generate it according to the Skill instructions during the first integration; otherwise, it will result in a runtime error.
  • The subprocess calls agent-browser, which may fail in environments without graphics or browser sessions. Deployment methods need to be aligned with OpenClaw documentation.

Conclusion

“Tianyancha New Enterprise Auto Query” consolidates “monitoring new enterprise pages → filtering by region → deduplication → WeCom push” into a community Skill based on SKILL.md. It is suitable for teams that do not want to immediately connect to the Open Platform but already have browser access capabilities. Installation and coordinates are subject to SkillHub.

  • Official Address: https://api.skillhub.cn/user_65867666/tianyancha-region-monitor
  • SkillHub Page: https://www.skillhub.cn/skills/user_65867666/tianyancha-region-monitor
  • Installation Instructions: https://skillhub.cn/install/skillhub.md
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye