weibo-scraper
Skill4 starsChanged 3 months agoMITView on GitHub
Use when a user provides Weibo/微博 links, asks to fetch 微博 post text, likes, video visual content, or wants to fill a Lark Base table from 微博 links.
In this repository22 other files it gives its agents.
- aihotSkill
- bilibili-creator-finderSkill
- douyin-scraperSkill
- feishu-cli-managerSkill
- funcinating-guidesSkill
- funcinating-newsSkill
- hot-topicsSkill
- humanizerSkill
- humanizer-zhSkill
- imap-smtp-emailSkill
- lark-base-replicaSkill
- oss-uploadSkill
- seedance-promptSkill
- shopifySkill
- skill-publisherSkill
- skill-vetterSkill
- slider-captchaSkill
- tikhub-querySkill
- tiktok-scraperSkill
- video-downloadSkill
- wechat-scraperSkill
- xiaohongshu-scraperSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use this skill for 微博公开帖子链接抓取和飞书 Base 回填.
- Distinctive: line 16
Use the dedicated Weibo browser profile and CDP endpoint:
- Very specific: line 22
Do not use the default Chrome profile for Weibo scraping.
- Very specific: line 77
Use 评论状态 as a separate operations queue:
- Distinctive: line 97
Do not bypass CAPTCHAs, private content, paywalls, or account restrictions.
- Distinctive: line 98
Do not print cookies, tokens, localStorage, or profile secrets.
- Distinctive: line 99
Stop immediately on CAPTCHA, platform risk, or login-risk signals.
- Distinctive: line 100
Use one live Chrome session for a batch.
- Very specific: line 101
If using a visible CDP browser, use port 9224 and the Weibo profile only.
- Very specific: line 105
Read references/strategy.md before changing browser, status, video, or Base write behavior.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Weibo Scraper
Overview
Use this skill for 微博公开帖子链接抓取和飞书 Base 回填. Prefer a live Chrome CDP session because Weibo static endpoints often return Visitor System or Forbidden.
Browser Profile
Use the dedicated Weibo browser profile and CDP endpoint:
- CDP URL:
http://127.0.0.1:9224 - user-data-dir:
$HOME/Library/Application Support/Google/SocialScraperProfiles/Weibo - launcher:
~/.agents/social-browser-profiles/launch-social-chrome.sh weibo
Do not use the default Chrome profile for Weibo scraping. Do not share this port/profile with Douyin or Xiaohongshu jobs.
The Base entrypoint uses a local platform lock at /tmp/social-scraper-locks/weibo.lock; do not run two Weibo jobs at the same time from different sessions.
In CDP mode, --new-tab means "use the reusable worker tab", not "create a fresh tab every run". The scraper finds a tab whose window.name is codex-weibo-worker; if none exists, it creates one and then keeps reusing it by replacing the URL.
Workflow
For one-off diagnostics:
python3 ~/.agents/skills/weibo-scraper/scripts/scrape-weibo.py \
--json --json-input --cdp-url http://127.0.0.1:9224 --new-tabFor Lark Base batch work:
node ~/.agents/skills/weibo-scraper/scripts/process-lark-weibo.mjs \
--base-token <base_token> \
--table-id <table_id> \
--view-id <view_id> \
--cdp-url http://127.0.0.1:9224 \
--cdp-only \
--new-tab \
--batch-size 6Batch mode writes each row back to Lark immediately after that row's scrape result is produced.
For logged-in comment execution:
node ~/.agents/skills/weibo-scraper/scripts/process-lark-weibo.mjs \
--base-token <base_token> \
--table-id <table_id> \
--view-id <view_id> \
--cdp-url http://127.0.0.1:9224 \
--cdp-only \
--new-tab \
--worker-tab-name codex-weibo-worker \
--comment \
--batch-size 3Lark Status Rules
- blank/null: treat as
准备抓取. 准备抓取: first scrape. Fetch正文,点赞数,收藏数, and抓取时间. For videos, add visual-frame analysis to正文.保持抓取: refresh only点赞数,收藏数, and抓取时间. Do not overwrite正文.抓取异常: confirmed inaccessible, deleted, login/risk wall after allowed fallback, or unsafe to retry.停止抓取: manual or rule-based stop state for rows that no longer need engagement tracking.
On successful 准备抓取, write body and engagement fields, then set 抓取状态=保持抓取. On successful 保持抓取, update only engagement fields and 抓取时间. On confirmed terminal failure, set 抓取状态=抓取异常 and write 抓取时间. 停止抓取 is not set automatically unless a separate stop-tracking rule is explicitly enabled.
Comment Status Rules
Use 评论状态 as a separate operations queue:
- blank/null: default, not yet selected for commenting.
准备评论: selected by threshold or manual review and waiting for comment execution.取消评论: manually decided not to comment.评论成功: comment has been posted.评论失败: a comment attempt failed and is not currently being retried.
The table does not need a 评论方式 field unless platform behavior becomes mixed. Keep 评论状态 blank by default. For Weibo, 准备评论 means the row has entered the comment queue and may be commented automatically from the logged-in browser. If automatic commenting is unavailable or risky, leave the row in 准备评论 for manual handling or write 评论失败 with a failure reason field if present.
Weibo comments can be posted automatically from the logged-in CDP browser when 抓取状态=保持抓取, 生成评论 is non-empty, and 评论状态 is blank or 准备评论. The current flow fills textarea[placeholder="发布你的评论"], clicks the 评论 button, then verifies the comment text appears before writing 评论成功.
Output Rules
正文: visible Weibo post text first. For videos, append【视频内容解析】when frame analysis succeeds.点赞数: visible Weibo like count. If the UI shows bare赞with no number, write0.收藏数: Weibo public posts do not expose a reliable collection count in the current page; write0.抓取时间: local datetime rounded to minutes, e.g.YYYY-MM-DD HH:mm:00.
Safety
- Do not bypass CAPTCHAs, private content, paywalls, or account restrictions.
- Do not print cookies, tokens, localStorage, or profile secrets.
- Stop immediately on CAPTCHA, platform risk, or login-risk signals.
- Use one live Chrome session for a batch. Do not launch and close Chrome per URL.
- If using a visible CDP browser, use port
9224and the Weibo profile only.
References
- Read
references/strategy.mdbefore changing browser, status, video, or Base write behavior.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

