关于 linkedin-commenter-extractor
用于从 LinkedIn 帖子提取评论者资料和评论内容的命令行技能。它通过 Apify 运行,无需 LinkedIn Cookie。
主要功能
- 01提取评论者姓名和资料
- 02获取评论内容与帖子 URL
- 03将标题解析为职位和公司
- 04导出 JSON、CSV 或摘要
- 05跨帖子去重
适用场景
- 01从帖子讨论建立潜在客户名单
- 02汇总多个帖子的评论者
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ gooseworks-ai/ goose-skills --skill linkedin-commenter-extractor安装后在 Claude Code 中输入/linkedin-commenter-extractor确认已加载。
附带文件scripts/extract_commenters.pyskill.meta.json
详细介绍
LinkedIn 评论者提取器
从评论了特定 LinkedIn 帖子的用户中提取姓名、职位、公司、LinkedIn URL 和评论文本。使用 Apify,无需 LinkedIn Cookie。
快速开始
需要安装 requests,并设置 APIFY_API_TOKEN 环境变量。
# Extract commenters from a single post
python3 skills/linkedin-commenter-extractor/scripts/extract_commenters.py \
--post-url "https://www.linkedin.com/posts/someone_topic-activity-123456789"
# Multiple posts
python3 skills/linkedin-commenter-extractor/scripts/extract_commenters.py \
--post-url URL1 --post-url URL2
# Limit comments per post
python3 skills/linkedin-commenter-extractor/scripts/extract_commenters.py \
--post-url URL --max-comments 50
# Output formats
python3 skills/linkedin-commenter-extractor/scripts/extract_commenters.py --post-url URL --output json
python3 skills/linkedin-commenter-extractor/scripts/extract_commenters.py --post-url URL --output csv
python3 skills/linkedin-commenter-extractor/scripts/extract_commenters.py --post-url URL --output summary
# Deduplicate across multiple posts
python3 skills/linkedin-commenter-extractor/scripts/extract_commenters.py \
--post-url URL1 --post-url URL2 --dedup
工作原理
- 接收一个或多个 LinkedIn 帖子 URL
- 调用
harvestapi~linkedin-post-commentsApify actor(无需 Cookie) - 提取评论者姓名、标题(职位 + 公司)、LinkedIn 个人资料 URL 和评论文本
- 尽可能将标题解析为单独的职位和公司字段
- 可选择根据 LinkedIn 个人资料 URL 对多个帖子中的评论者去重
命令行参考
| 标志 | 默认值 | 说明 |
|---|---|---|
--post-url | 必填 | LinkedIn 帖子 URL(可重复指定多个帖子) |
--max-comments | 100 | 每个帖子最多提取的评论数 |
--output | json | 输出格式:json、csv、summary |
--dedup | false | 对多个帖子中的评论者去重 |
--token | 环境变量 | Apify API Token(覆盖 APIFY_API_TOKEN 环境变量) |
--timeout | 120 | 等待 Apify 运行的最长秒数 |
输出架构
{
"name": "Jane Smith",
"headline": "VP of Finance at Acme Corp",
"title": "VP of Finance",
"company": "Acme Corp",
"linkedin_url": "https://www.linkedin.com/in/janesmith",
"comment_text": "Great insights on AI in accounting...",
"post_url": "https://www.linkedin.com/posts/...",
"profile_image_url": "https://..."
}
费用
使用 harvestapi~linkedin-post-comments Apify actor,每 1,000 条评论约需 $2。无需 LinkedIn Cookie 或登录。
评论
支持 Markdown