mcpField
L
linkedin-commenter-extractor

linkedin-commenter-extractor

github.com/gooseworks-ai营销与增长1.3k49 次安装3 天前更新
代码仓库

关于 linkedin-commenter-extractor

用于从 LinkedIn 帖子提取评论者资料和评论内容的命令行技能。它通过 Apify 运行,无需 LinkedIn Cookie。

主要功能

  1. 01提取评论者姓名和资料
  2. 02获取评论内容与帖子 URL
  3. 03将标题解析为职位和公司
  4. 04导出 JSON、CSV 或摘要
  5. 05跨帖子去重

适用场景

  1. 01从帖子讨论建立潜在客户名单
  2. 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

工作原理

  1. 接收一个或多个 LinkedIn 帖子 URL
  2. 调用 harvestapi~linkedin-post-comments Apify actor(无需 Cookie)
  3. 提取评论者姓名、标题(职位 + 公司)、LinkedIn 个人资料 URL 和评论文本
  4. 尽可能将标题解析为单独的职位和公司字段
  5. 可选择根据 LinkedIn 个人资料 URL 对多个帖子中的评论者去重

命令行参考

标志默认值说明
--post-url必填LinkedIn 帖子 URL(可重复指定多个帖子)
--max-comments100每个帖子最多提取的评论数
--outputjson输出格式:json、csv、summary
--dedupfalse对多个帖子中的评论者去重
--token环境变量Apify API Token(覆盖 APIFY_API_TOKEN 环境变量)
--timeout120等待 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