SuperAPI AI 工具集

linkedin-commenter-extractor

通用与其它

查看项目

更新于 10-16 08:02

技能介绍

用途:抓取一条或多条 LinkedIn 帖子的评论者,生成潜在客户名单,适合从思想领导力或竞品帖子的互动人群中筛选线索。可接在 linkedin-post-research 之后,作为 linkedin-message-writer 或冷邮件外联的上游。

主要能力:输出每位评论者的 name、headline、title、company、linkedin_url、comment_text、post_url、profile_image_url,支持跨帖子按主页链接去重。头衔按“X at Y”或“X @ Y”模式启发式解析,歧义时保留原始 headline,title/company 留空。

使用方式:仅需 Python 3 标准库,无需安装。命令示例:python3 ${SKILL_DIR}/scripts/extract_commenters.py --post-urls "https://www.linkedin.com/posts/x_y-activity-123,https://www.linkedin.com/posts/..." --max-comments 100 --dedup --output csv。参数:--post-urls 必填,逗号分隔帖子 URL;--max-comments 默认 100;--dedup 默认关闭;--actor 默认 apimaestro post-comments;--output 支持 json/csv/summary,默认 json。

凭据:无必需环境变量。设置 APIFY_API_TOKEN 时走 Apify 无 Cookie 评论抓取(主路径,吞吐更高);否则使用 LI_AT 会话 Cookie 的 Playwright 降级方案(无密钥默认,量较低,需先执行 npx playwright install chromium)。

限制:评论列表分页且懒加载,抓取器会滚动展开至 max-comments;头衔解析为启发式,可能留空;多帖抓取时建议去重;Apify 路径约每 1k 条评论消耗积分,大批量运行前需注意成本。