← 返回 Skills 市场
dr-xiaoming

Social Media Data Collector

作者 Dr-xiaoming · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
68
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install social-media-data-collector
功能描述
Multi-platform social media data collection and aggregation for content performance tracking. Use when: (1) collecting engagement metrics (views/likes/commen...
使用说明 (SKILL.md)

Social Media Data Collector

Overview

Collect engagement metrics from 13+ platforms, aggregate into structured format (飞书多维表格/CSV). Three-tier approach: API first → browser scrape fallback → manual flag.

Execution Flow

  1. Classify platforms by data access method (see references/platform-guide.md)
  2. API tier — call APIs for platforms with programmatic access
  3. Browser tier — Playwright render + text extraction for remaining
  4. Aggregate — normalize data, write to target (bitable/CSV)
  5. Cleanup — remove screenshots, temp files, browser cache

Platform Tiers

Tier Platforms Method
API-first 抖音, 微博, 快手, B站, 今日头条, 小红书 TikHub API / BlueAI Crawler
Browser-scrape 百家号, 汽车之家, 易车, 视频号, 斗鱼, 皮皮虾 Playwright headless
API+scrape 懂车帝 TikHub (limited) + scrape

Model Strategy (Token Optimization)

Problem

Using opus/sonnet for the entire pipeline wastes tokens on mechanical tasks.

Recommended Model Split

Phase Model Why
Planning & classification opus/sonnet Needs reasoning
API calls & JSON parsing haiku/flash Mechanical, no reasoning needed
Browser text extraction Code (no LLM) Pure Python, no model call
Data normalization haiku/flash Simple mapping
Report/summary sonnet Needs synthesis

Implementation

  • Use scripts/collect_api.py for API tier — zero LLM tokens (pure code)
  • Use scripts/collect_browser.py for browser tier — zero LLM tokens (pure code)
  • Only invoke LLM for: planning which platforms to hit, handling errors, writing summaries

Token Budget Estimate (per 13-platform run)

  • With current approach (all-opus): ~80k tokens
  • With optimized approach (code scripts + haiku routing): ~5k tokens
  • Savings: 94%

Key Commands

# Full collection run
python3 scripts/collect_api.py --config /tmp/sm-collect/config.json

# Browser scrape specific platforms  
python3 scripts/collect_browser.py --platforms "百家号,汽车之家,视频号"

# Write to bitable
python3 scripts/write_bitable.py --app-token XXX --table-id YYY --data /tmp/sm-collect/results.json

# Cleanup
rm -rf /tmp/sm-collect/ /tmp/screenshots/

Bitable Field Mapping

多维表格字段 类型 说明
播放量 text 带"万"后缀的文本
点赞 number 纯数字
评论 number 纯数字
分享 number 纯数字
收藏 number 纯数字
互动量合计 text 带"万"后缀的文本
数据统计日期 text 格式 "2026.5.15"

⚠️ 注意 播放量互动量合计 是 text 类型,不是 number!传数字会报 TextFieldConvFail。

Cleanup Protocol

After each collection run, delete:

  • /tmp/sm-collect/ (intermediate JSON)
  • /tmp/screenshots/ (browser screenshots)
  • /tmp/subagent-out/ (if spawned sub-agents)
  • Any .json temp files in workspace

Error Handling

  • API 403/401 → token expired, refresh and retry once
  • Browser timeout → increase to 25s, retry with wait_until="domcontentloaded"
  • Platform redirects → check URL is correct (易车 hao vs sv domain!)
  • Empty data → flag for manual check, don't guess

Platform-Specific Notes

See references/platform-guide.md for detailed per-platform experience including:

  • Authentication requirements
  • URL patterns and gotchas
  • Data extraction selectors
  • Known limitations
安全使用建议
This skill appears safe for its stated purpose if you intend to collect social media metrics and update a Feishu Bitable. Before using it, confirm the exact URLs, table ID, and record IDs, use least-privilege TikHub and Feishu credentials, and restrict cleanup to files created by this run.
功能分析
Type: OpenClaw Skill Name: social-media-data-collector Version: 1.0.0 The skill bundle is a social media data aggregator designed to collect engagement metrics from over 13 platforms and sync them to Feishu Bitable. It utilizes the TikHub API (scripts/collect_api.py) and Playwright-based scraping (scripts/collect_browser.py) as a fallback. The implementation is transparent, includes a cleanup protocol for temporary files, and lacks any indicators of malicious intent, such as unauthorized data exfiltration or hidden backdoors. The use of third-party APIs (api.tikhub.io) and browser automation is consistent with the stated goal of cross-platform data tracking.
能力标签
requires-oauth-tokenrequires-sensitive-credentials
能力评估
Purpose & Capability
The scripts match the stated purpose: collect engagement metrics through APIs or browser scraping and write normalized results to Feishu Bitable. The Bitable write capability is expected but can modify user business data.
Instruction Scope
The execution flow is disclosed and task-focused. The cleanup instructions include broader temporary-file deletion language that should be interpreted narrowly.
Install Mechanism
There is no automatic install mechanism, but the browser tier requires Playwright/Chromium and suggests an unpinned pip install command if missing.
Credentials
Network access to TikHub, Feishu, and the target social platforms is proportional to the skill purpose. Users should still treat submitted URLs, metrics, and credentials as external data flows.
Persistence & Privilege
No background persistence or token storage is shown. The skill does use Feishu app credentials and Bitable table identifiers to update records, so least-privilege credentials are important.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install social-media-data-collector
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /social-media-data-collector 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: 13-platform data collection with API + browser scraping, Feishu bitable integration
元数据
Slug social-media-data-collector
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Social Media Data Collector 是什么?

Multi-platform social media data collection and aggregation for content performance tracking. Use when: (1) collecting engagement metrics (views/likes/commen... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 68 次。

如何安装 Social Media Data Collector?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install social-media-data-collector」即可一键安装,无需额外配置。

Social Media Data Collector 是免费的吗?

是的,Social Media Data Collector 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Social Media Data Collector 支持哪些平台?

Social Media Data Collector 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Social Media Data Collector?

由 Dr-xiaoming(@dr-xiaoming)开发并维护,当前版本 v1.0.0。

💬 留言讨论