抓取某个微博用户在某个时间发的微博内容。只需要说:抓一下XXX的微博。

v1.0.0

抓取指定微博用户的帖子内容。当用户提到"抓微博"、"微博内容"、"看微博"、"weibo"、"某人微博"等关键词时使用此 skill。支持按日期筛选、自动获取长文全文、滚动加载防遗漏。基于 m.weibo.cn 移动端 + browser 工具实现,无需登录即可抓取公开微博。

0· 105·0 current·0 all-time
byop3nclaw@x1a0f31

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for x1a0f31/weibo-scraper.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "抓取某个微博用户在某个时间发的微博内容。只需要说:抓一下XXX的微博。" (x1a0f31/weibo-scraper) from ClawHub.
Skill page: https://clawhub.ai/x1a0f31/weibo-scraper
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

Canonical install target

openclaw skills install x1a0f31/weibo-scraper

ClawHub CLI

Package manager switcher

npx clawhub@latest install weibo-scraper
Security Scan
VirusTotalVirusTotal
Pending
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the implementation: the SKILL.md and helper script both describe browser automation against m.weibo.cn to find a user's posts, handle long posts, and scroll to load more items. No unrelated credentials, binaries, or install steps are requested.
Instruction Scope
Runtime instructions are narrowly scoped to browser navigation, DOM snapshotting, scrolling, extracting post timestamps, preview text, and visiting /status/{id} pages to retrieve full text. They do not instruct reading local files, system env vars, or sending data to third parties.
Install Mechanism
No install spec or downloaded code beyond a small included browser helper script. The script contains only DOM queries and string extraction—no remote downloads or extraction steps.
Credentials
The skill requests no environment variables, credentials, or config paths. Its needs (a browser tool capable of navigate/evaluate/close) are proportionate to the stated scraping task.
Persistence & Privilege
always:false and the skill does not request persistent agent-level privileges or modify other skills. disable-model-invocation is false (default), which permits autonomous invocation but is normal platform behavior and not, by itself, a concern.
Assessment
This skill appears to do what it says: automated browsing of m.weibo.cn to collect public posts. Before installing, consider: (1) legal/ToS and privacy — ensure you have the right to scrape and store the target user's public posts and comply with Weibo's terms; (2) rate-limiting and detection — implement throttling if you will run it repeatedly to avoid IP blocking or anti-scraping measures; (3) scope your scraping — prefer single-user, date-limited queries rather than bulk harvesting; (4) autonomous runs — the skill can be invoked by the agent automatically (platform default), so restrict or monitor agent behavior if you are concerned about repeated or unattended scraping. If you need broader guarantees (e.g., logging, request throttling, proxy handling), ask the author to add explicit safeguards to the instructions or helper code.

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

latestvk971zffhtx16b5gsy57ghytz49854j76
105downloads
0stars
1versions
Updated 6d ago
v1.0.0
MIT-0

Weibo Scraper

抓取微博用户帖子的浏览器自动化工作流。

核心方案

使用 browser 工具访问 m.weibo.cn(移动端),无需登录即可查看公开微博。移动端比 PC 端结构简单、反爬弱、渲染快。

工作流

1. 获取目标用户 UID

如果已知 UID,跳到步骤 2。

否则,用 browser 导航到 https://m.weibo.cn/search?luicode=10000011&lfid=100103type%3D1%26q%3D{URL编码的昵称},在搜索结果中找到用户主页链接,从中提取 UID(格式为 /u/{UID}/profile/{UID})。

2. 访问用户主页

navigate → https://m.weibo.cn/u/{UID}

页面加载后,snapshot 可见帖子列表。帖子结构:

  • 每条帖子在一个 banner 块中
  • 发布时间在 heading 元素中,格式如 4-17 08:37 来自 微博网页版
  • 正文在 article 元素中
  • 如果正文被截断,会有 link "全文" 元素,URL 为 /status/{微博ID}

3. 筛选目标日期的帖子

遍历 snapshot 中的所有帖子,匹配 .time heading 中的日期部分(如 4-17)。

注意:日期格式为 M-D,不补零(如 4-17 不是 04-17)。跨年帖子会显示年份(如 2025-12-28)。

4. 获取全文

短帖:主页 snapshot 中的 article 内容即为完整文本。

长帖(有"全文"链接):

  1. 记录 /status/{微博ID} 中的微博ID
  2. navigate → https://m.weibo.cn/status/{微博ID}
  3. snapshot 获取完整正文
  4. 返回主页继续处理

5. 滚动加载

主页默认只显示最近的约 10 条帖子。如果目标日期的帖子不在首屏:

window.scrollTo(0, document.body.scrollHeight)

执行后等 1-2 秒再 snapshot,检查是否加载了更多帖子。重复滚动直到目标日期的帖子全部出现。

6. 关闭浏览器

抓取完成后,关闭本次打开的浏览器标签页:

browser → close → targetId: {当前标签页的 targetId}

释放资源,避免残留标签页占用内存。

7. 输出格式

按时间从早到晚排序,每条帖子标注序号和发布时间:

① HH:MM
[正文内容]

② HH:MM
[正文内容]

注意事项

  • 无需登录:m.weibo.cn 可直接查看公开微博
  • 不要用 APIm.weibo.cn/api/container/getIndex 会被 432 反爬拦截
  • 不要用 PC 端:weibo.com 结构复杂,反爬更强
  • 日期格式:注意 M-D 不补零,如 4-17 而非 04-17
  • 滚动后重新 snapshot:滚动后必须重新 snapshot 才能看到新加载的内容

Comments

Loading comments...