facebook-groups-scrape-posts
它能做什么
这项技能在你登录后,读取你可以查看的 Facebook 群组帖子,并返回每条帖子的详细信息。适合研究群组讨论的研究人员、社群运营者和营销人员。
适用场景
- ✓当你想查看自己所在的 Facebook 群组中的最新帖子时。
- ✓当你需要研究社群里互动最多的帖子时。
- ✓当你想收集一定数量的群组帖子用于分析的时候。
技能链接
https://github.com/browser-act/skills/blob/main/solutions/social-listening/facebook-groups-scrape-posts/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我收集 facebook.com/groups/example-group 这个群组中最近的 50 条帖子,并附上反应数和评论数。”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能会在你已登录的浏览器中打开群组页面,按你选择的顺序读取帖子,数量以你设定的为准。它返回每条帖子的 ID、链接、作者、时间、正文、媒体、反应数,以及评论数和分享数。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Facebook Groups — Scrape Posts
Input: Facebook group URL + sort order + desired count → Output: post list with full metadata (JSON).
Language
All process output to user (progress updates, process notifications) follows the user's language.
Objective
Given a Facebook group URL, scrape N posts sorted by the specified order and return structured metadata for each post.
Prerequisites
- Target group page is already open in the browser:
https://www.facebook.com/groups/{group_slug_or_id} - Already logged into Facebook (user avatar, Messenger icon, and notification bell visible in the top-right corner)
Pre-execution Checks
1. Tool Readiness
If browser-act has been confirmed available in the current session → skip this step.
Invoke browser-act via Skill tool to load usage. If installation or configuration issues arise, follow its guidance to resolve then retry.
2. Login Verification
If Facebook login status has been confirmed in the current session → skip this step.
Otherwise, navigate to https://www.facebook.com/ and verify login status programmatically:
browser-act navigate 'https://www.facebook.com/'
browser-act wait stable --timeout 15000
browser-act eval "JSON.stringify({user_id: document.cookie.match(/c_user=(\d+)/)?.[1] || '0', USER_ID: (()=>{try{return require('CurrentUserInitialData').USER_ID;}catch(e){return '0';}})()})"
Verdict:
user_idis a non-empty numeric string (e.g.,"61560817072276"), orUSER_ID !== "0"→ logged in, continueuser_id === nullorUSER_ID === "0"→ not logged in; assist user: runbrowser-act browser open {browser_id} https://www.facebook.com/login --headedto open a headed window so the user can sign in manually (Stealthnormalmode persists cookies — one login is reusable)
Facebook may clear c_user mid-session: if GraphQL errors such as field_exception or missing_required_variable_value occur during execution, re-run this login check before assuming the script is broken.
User refuses or cannot log in → terminate execution. Facebook enforces strict restrictions on unauthenticated group access (login modal blocks pagination, feed returns partial data + field_exception); login is a hard prerequisite.
Capability Components
This Skill's operational boundary = what the user can manually do in their browser. It only reads data already displayed to the authenticated user, never bypassing authentication or access controls — equivalent to copy-pasting on the user's behalf. JS code is encapsulated in Python files under the
scripts/directory, invoked viaeval "$(python scripts/xxx.py {params})".$(...)is bash syntax; use the bash tool for execution.
API: Scrape group posts (with auto-pagination)
Navigate to the target group page first, then invoke the scrape script (it auto-resolves the numeric group ID from the current page):
browser-act navigate 'https://www.facebook.com/groups/{group_slug_or_id}'
browser-act wait stable --timeout 20000
browser-act eval "$(python scripts/scrape-posts.py --sort CHRONOLOGICAL --count 20)"
Parameters:
--sort: Sort order, defaultCHRONOLOGICAL. See "Enum Parameters" below--count: Desired number of posts, default20. Script auto-paginates until count is met or feed is exhausted--max-pages: Pagination safety cap, default100--doc-id: GraphQL persisted querydoc_idforGroupsCometFeedRegularStoriesPaginationQuery, default26577462205242925. Update via this flag if Facebook rotates the version (see "Known Limitations")
Output example:
{
"ok": true,
"group_id": "2580640642080467",
"group_name": "Programmer Humor",
"sort": "CHRONOLOGICAL",
"total": 20,
"posts": [
{
"post_id": "4052937798184070",
"cache_id": "6790541484885792441",
"id": "UzpfSTEwMDA4ODY4MzIx...",
"permalink_url": "https://www.facebook.com/groups/programmerhumor/posts/4052937798184070/",
"creation_time": 1772941518,
"message": "Those were the days my friend ...",
"author": {
"id": "100088683215191",
"name": "Jeff Bramlett",
"profile_picture": null,
"url": "https://www.facebook.com/JeffieB56"
},
"group": {
"id": "2580640642080467",
"name": "Programmer Humor",
"url": "https://www.facebook.com/groups/programmerhumor/"
},
"reactions": {
"total": 1,
"total_formatted": "1",
"breakdown": [
{ "name":
常见问题
我需要登录 Facebook 吗?
需要。这项技能会检查你是否已登录 Facebook,读取群组需要登录状态。
我最多可以收集多少条帖子?
帖子数量由你决定。
每条帖子记录包含什么?
每条记录包括帖子链接、作者、发布时间、正文、图片或视频、反应数,以及评论数和分享数。
详情
作者的原始描述
Scrapes posts from a Facebook group given a group URL, sort order, and desired count — returns structured post metadata including post_id, permalink, author, timestamp, body text, images/videos, reaction counts, reaction type breakdown, comment count, and share count. Use when: user wants to scrape/extract Facebook group posts, collect FB group content, harvest group data, get posts from a Facebook group, monitor Facebook group activity, bulk export group posts, facebook groups scraping, facebook-groups-scrape-posts, fetch FB group feed.
repo: browser-act/skills
热度
- GitHub 星标
- 6.3k
- 排名
- #14303
- 许可证
- MIT
- 更新时间
- 2026/8/24
评论
- …
同一仓库的更多技能
browser-act-skill-forge
6.3k帮你的智能体探索一次网站,并保存一个带脚本的可复用技能,使之后从该网站提取数据更快。
browser-act
6.3k帮你的智能体运行浏览器自动化工具,打开页面、读取渲染后的内容、填写表单、截图,并管理已登录的会话。
1688-product-detail
6.3k帮你的智能体从 1688.com 批发页面提取商品详情,例如价格阶梯、规格变体、卖家统计数据和属性。
airbnb-listing-detail
6.3k帮你的智能体根据 ID 获取 Airbnb 房源的公开详情,例如照片、设施、评分和房屋规则。