多平台自媒体数据看板 - 一键聚合各平台粉丝、阅读、收益数据,生成可视化报表。
浏览器AppleScript 支持执行 JS需要权限推荐度Chrome✅ 完整支持✅需手动开启⭐⭐⭐ 推荐Safari✅ 完整支持✅需手动开启⭐⭐⭐ 推荐Firefox❌ 不支持❌-不适用
根据用户请求选择对应平台的数据采集流程:
平台触发词数据页面头条号头条号、头条mp.toutiao.comCSDNCSDN、博客mp.csdn.net知乎知乎、知乎创作zhihu.com/creator
当用户请求查看头条号或 CSDN 数据时, 必须按照以下流程执行:
优先检测 Chrome,其次 Safari:
bash
# 检测 Chrome
osascript -e 'tell application "System Events" to return exists application process "Google Chrome"' 2>/dev/null || echo "NOT_INSTALLED"
# 检测 Safari
osascript -e 'tell application "System Events" to return exists application process "Safari"' 2>/dev/null || echo "NOT_INSTALLED"
如果 Chrome 和 Safari 都不可用:
你的电脑上没有支持的浏览器。本 skill 支持 Chrome 或 Safari。
解决方案:
- 安装 Chrome 或使用系统自带的 Safari
- 或者手动提供数据:在浏览器中打开头条号后台,复制页面数据给我
根据可用浏览器,使用对应的检测脚本:
bash
osascript <<'EOF'
tell application "Google Chrome"
try
set windowCount to count of windows
return "PERMISSION_OK"
on error
return "PERMISSION_DENIED"
end try
end tell
EOF
bash
osascript <<'EOF'
tell application "Safari"
try
set docCount to count of documents
return "PERMISSION_OK"
on error
return "PERMISSION_DENIED"
end try
end tell
EOF
Chrome 开启步骤:
Safari 开启步骤:
检测到浏览器未开启 AppleScript 执行权限。
请按上述步骤开启权限后告诉我「好了」。
使用已授权的浏览器访问头条号:
bash
osascript <<'EOF'
tell application "Google Chrome"
set URL of active tab of front window to "https://mp.toutiao.com/profile_v4/"
delay 3
set pageText to execute active tab of front window javascript "document.body.innerText"
return pageText
end tell
EOF
bash
osascript <<'EOF'
tell application "Safari"
set URL of front document to "https://mp.toutiao.com/profile_v4/"
delay 3
set pageText to do JavaScript "document.body.innerText" in front document
return pageText
end tell
EOF
检测到你还未登录头条号,请先登录:
- 我已为你打开头条号登录页面
- 在浏览器中完成登录(扫码或账号密码)
- 登录成功后告诉我「登录好了」
所有条件满足后,执行完整数据采集:
bash
# 首页
osascript <<'EOF'
tell application "Google Chrome"
set URL of active tab of front window to "https://mp.toutiao.com/profile_v4/"
delay 3
set pageText to execute active tab of front window javascript "document.body.innerText"
return pageText
end tell
EOF
# 收益数据
osascript <<'EOF'
tell application "Google Chrome"
set URL of active tab of front window to "https://mp.toutiao.com/profile_v4/analysis/income-overview"
delay 3
set pageText to execute active tab of front window javascript "document.body.innerText"
return pageText
end tell
EOF
# 作品数据-文章
osascript <<'EOF'
tell application "Google Chrome"
set URL of active tab of front window to "https://mp.toutiao.com/profile_v4/analysis/works-single/article"
delay 3
set pageText to execute active tab of front window javascript "document.body.innerText"
return pageText
end tell
EOF
# 粉丝数据
osascript <<'EOF'
tell application "Google Chrome"
set URL of active tab of front window to "https://mp.toutiao.com/profile_v4/analysis/fans/overview"
delay 3
set pageText to execute active tab of front window javascript "document.body.innerText"
return pageText
end tell
EOF
bash
# 首页
osascript <<'EOF'
tell application "Safari"
set URL of front document to "https://mp.toutiao.com/profile_v4/"
delay 3
set pageText to do JavaScript "document.body.innerText" in front document
return pageText
end tell
EOF
# 收益数据
osascript <<'EOF'
tell application "Safari"
set URL of front document to "https://mp.toutiao.com/profile_v4/analysis/income-overview"
delay 3
set pageText to do JavaScript "document.body.innerText" in front document
return pageText
end tell
EOF
# 作品数据-文章
osascript <<'EOF'
tell application "Safari"
set URL of front document to "https://mp.toutiao.com/profile_v4/analysis/works-single/article"
delay 3
set pageText to do JavaScript "document.body.innerText" in front document
return pageText
end tell
EOF
# 粉丝数据
osascript <<'EOF'
tell application "Safari"
set URL of front document to "https://mp.toutiao.com/profile_v4/analysis/fans/overview"
delay 3
set pageText to do JavaScript "document.body.innerText" in front document
return pageText
end tell
EOF
页面URL数据内容首页/profile_v4/账号信息、粉丝数、总阅读、累计收益收益数据/analysis/income-overview日收益明细、收益趋势、可提现金额作品数据-全部/analysis/works-overall/all整体展现量、阅读量、点赞评论作品数据-文章/analysis/works-overall/article文章整体数据作品数据-微头条/analysis/works-overall/weitoutiao微头条整体数据单篇作品-文章/analysis/works-single/article每篇文章详细数据单篇作品-微头条/analysis/works-single/weitoutiao每条微头条详细数据粉丝数据/analysis/fans/overview粉丝变化、活跃度、粉丝画像
从页面文本中提取数据,生成 Markdown 格式的数据看板。
text
用户请求查看头条号数据
↓
检测可用浏览器
↓ ↓
Chrome/Safari 无 → 提示安装或手动提供数据
↓
权限已开启?
↓ ↓
是 否 → 引导用户开启权限
↓
已登录?
↓ ↓
是 否 → 引导用户登录
↓
采集数据 → 生成报告
text
查看我的头条号数据
查看我的头条号详细数据
获取头条号粉丝统计
头条号收益查询
查看我的 CSDN 数据
查看 CSDN 博客数据
获取 CSDN 粉丝统计
CSDN 收益查询
查看我的知乎数据
知乎内容数据分析
知乎收益查询
知乎创作数据
生成自媒体数据周报
我的自媒体数据
当用户请求查看 CSDN 数据时,执行以下流程:
bash
osascript <<'EOF'
tell application "Google Chrome"
set URL of active tab of front window to "https://mp.csdn.net/"
delay 3
set pageText to execute active tab of front window javascript "document.body.innerText"
if pageText contains "登录" then
return "NOT_LOGGED_IN"
else
return "LOGGED_IN"
end if
end tell
EOF
bash
osascript <<'EOF'
tell application "Safari"
set URL of front document to "https://mp.csdn.net/"
delay 3
set pageText to do JavaScript "document.body.innerText" in front document
if pageText contains "登录" then
return "NOT_LOGGED_IN"
else
return "LOGGED_IN"
end if
end tell
EOF
检测到你还未登录 CSDN,请先登录:
- 我已为你打开 CSDN 创作者中心
- 在浏览器中完成登录(扫码或账号密码)
- 登录成功后告诉我「登录好了」
bash
# 作品数据
osascript <<'EOF'
tell application "Google Chrome"
set URL of active tab of front window to "https://mp.csdn.net/mp_blog/analysis/article/all"
delay 3
set pageText to execute active tab of front window javascript "document.body.innerText"
return pageText
end tell
EOF
# 收益数据
osascript <<'EOF'
tell application "Google Chrome"
set URL of active tab of front window to "https://mp.csdn.net/mp_others/analysis/rewardall"
delay 3
set pageText to execute active tab of front window javascript "document.body.innerText"
return pageText
end tell
EOF
# 粉丝数据
osascript <<'EOF'
tell application "Google Chrome"
set URL of active tab of front window to "https://mp.csdn.net/mp_others/analysis/fans/dataOverview"
delay 3
set pageText to execute active tab of front window javascript "document.body.innerText"
return pageText
end tell
EOF
bash
# 作品数据
osascript <<'EOF'
tell application "Safari"
set URL of front document to "https://mp.csdn.net/mp_blog/analysis/article/all"
delay 3
set pageText to do JavaScript "document.body.innerText" in front document
return pageText
end tell
EOF
# 收益数据
osascript <<'EOF'
tell application "Safari"
set URL of front document to "https://mp.csdn.net/mp_others/analysis/rewardall"
delay 3
set pageText to do JavaScript "document.body.innerText" in front document
return pageText
end tell
EOF
# 粉丝数据
osascript <<'EOF'
tell application "Safari"
set URL of front document to "https://mp.csdn.net/mp_others/analysis/fans/dataOverview"
delay 3
set pageText to do JavaScript "document.body.innerText" in front document
return pageText
end tell
EOF
页面URL数据内容作品数据/mp_blog/analysis/article/all文章总数、阅读量、点赞、评论、收藏收益数据/mp_others/analysis/rewardall累计收益、可提现、昨日收益、本月收益粉丝数据/mp_others/analysis/fans/dataOverview粉丝总数、新增粉丝、活跃度
平台状态数据类型头条号✅ 已支持粉丝、阅读、收益CSDN✅ 已支持作品、收益、粉丝知乎✅ 已支持内容、收益公众号🚧 开发中粉丝、阅读、用户画像小红书📋 计划中粉丝、笔记数据B站📋 计划中粉丝、播放、互动抖音📋 计划中粉丝、视频、直播
当用户请求查看知乎数据时,执行以下流程:
bash
osascript <<'EOF'
tell application "Google Chrome"
set URL of active tab of front window to "https://www.zhihu.com/creator"
delay 3
set pageText to execute active tab of front window javascript "document.body.innerText"
if pageText contains "登录" or pageText contains "注册" then
return "NOT_LOGGED_IN"
else
return "LOGGED_IN"
end if
end tell
EOF
bash
osascript <<'EOF'
tell application "Safari"
set URL of front document to "https://www.zhihu.com/creator"
delay 3
set pageText to do JavaScript "document.body.innerText" in front document
if pageText contains "登录" or pageText contains "注册" then
return "NOT_LOGGED_IN"
else
return "LOGGED_IN"
end if
end tell
EOF
检测到你还未登录知乎,请先登录:
- 我已为你打开知乎创作者中心
- 在浏览器中完成登录(扫码或账号密码)
- 登录成功后告诉我「登录好了」
bash
# 内容总览
osascript <<'EOF'
tell application "Google Chrome"
set URL of active tab of front window to "https://www.zhihu.com/creator/analytics/work/all"
delay 4
set pageText to execute active tab of front window javascript "document.body.innerText"
return pageText
end tell
EOF
# 回答数据
osascript <<'EOF'
tell application "Google Chrome"
set URL of active tab of front window to "https://www.zhihu.com/creator/analytics/work/answer"
delay 4
set pageText to execute active tab of front window javascript "document.body.innerText"
return pageText
end tell
EOF
# 文章数据
osascript <<'EOF'
tell application "Google Chrome"
set URL of active tab of front window to "https://www.zhihu.com/creator/analytics/work/article"
delay 4
set pageText to execute active tab of front window javascript "document.body.innerText"
return pageText
end tell
EOF
# 想法数据
osascript <<'EOF'
tell application "Google Chrome"
set URL of active tab of front window to "https://www.zhihu.com/creator/analytics/work/pin"
delay 4
set pageText to execute active tab of front window javascript "document.body.innerText"
return pageText
end tell
EOF
# 视频数据
osascript <<'EOF'
tell application "Google Chrome"
set URL of active tab of front window to "https://www.zhihu.com/creator/analytics/work/zvideo"
delay 4
set pageText to execute active tab of front window javascript "document.body.innerText"
return pageText
end tell
EOF
# 收益数据
osascript <<'EOF'
tell application "Google Chrome"
set URL of active tab of front window to "https://www.zhihu.com/creator/income-analysis"
delay 4
set pageText to execute active tab of front window javascript "document.body.innerText"
return pageText
end tell
EOF
bash
# 内容总览
osascript <<'EOF'
tell application "Safari"
set URL of front document to "https://www.zhihu.com/creator/analytics/work/all"
delay 4
set pageText to do JavaScript "document.body.innerText" in front document
return pageText
end tell
EOF
# 回答数据
osascript <<'EOF'
tell application "Safari"
set URL of front document to "https://www.zhihu.com/creator/analytics/work/answer"
delay 4
set pageText to do JavaScript "document.body.innerText" in front document
return pageText
end tell
EOF
# 文章数据
osascript <<'EOF'
tell application "Safari"
set URL of front document to "https://www.zhihu.com/creator/analytics/work/article"
delay 4
set pageText to do JavaScript "document.body.innerText" in front document
return pageText
end tell
EOF
# 想法数据
osascript <<'EOF'
tell application "Safari"
set URL of front document to "https://www.zhihu.com/creator/analytics/work/pin"
delay 4
set pageText to do JavaScript "document.body.innerText" in front document
return pageText
end tell
EOF
# 视频数据
osascript <<'EOF'
tell application "Safari"
set URL of front document to "https://www.zhihu.com/creator/analytics/work/zvideo"
delay 4
set pageText to do JavaScript "document.body.innerText" in front document
return pageText
end tell
EOF
# 收益数据
osascript <<'EOF'
tell application "Safari"
set URL of front document to "https://www.zhihu.com/creator/income-analysis"
delay 4
set pageText to do JavaScript "document.body.innerText" in front document
return pageText
end tell
EOF
页面URL数据内容内容总览/creator/analytics/work/all综合数据、播放量、阅读量、互动回答数据/creator/analytics/work/answer回答阅读、点赞、评论、收藏想法数据/creator/analytics/work/pin想法浏览、互动数据文章数据/creator/analytics/work/article文章阅读、点赞、评论、收藏视频数据/creator/analytics/work/zvideo视频播放、点赞、评论、分享收益数据/creator/income-analysis累计收益、可提现、昨日收益、本月收益
text
social-media-dashboard/
├── SKILL.md # 本文件
├── platforms/
│ ├── toutiao.md # 头条号接口说明
│ ├── csdn.md # CSDN 接口说明
│ └── zhihu.md # 知乎接口说明
├── templates/
│ ├── dashboard.md # 数据看板模板
│ └── daily-report.md # 日报模板
└── scripts/
└── fetch-toutiao.sh # 数据采集脚本