social_ingestion_facebook
Automatically scrape, extract, and structure content from Facebook posts, pages, and groups for knowledge ingestion.
- License 许可
- MIT
- 最近更新
- 2026-10-09
- Stars
- ★ 2
- Forks
- 1
01 前言 Front Matter
- name
- social_ingestion_facebook
- tags
- [ "social-media", "facebook", "content-ingestion", "marketing" ]
- author
- SEOSONA OS
- version
- 1.0.0
- description
- Automatically scrape, extract, and structure content from Facebook posts, pages, and groups for knowledge ingestion.
- mcp_compatible
- true
03 SKILL.md 正文
🛠️ Skill: Facebook Content Ingestion
Purpose: Extracts post content, images, and engagement metrics from Facebook to populate the SEOSONA Knowledge Base. Overcomes common scraping blocks using Firecrawl MCP and specialized DOM parsing.
📥 Inputs & Requirements
- Dependencies: Firecrawl MCP Server, Apify Facebook Scraper (fallback).
- Input Format:
{ "url": "https://facebook.com/...", "extract_comments": boolean }
🧠 Execution Steps (The Method)
- Validation: Check if URL is a valid public Facebook post, page, or group link.
- Scraping Phase:
- Attempt Firecrawl MCP to grab the raw HTML/Markdown.
- If blocked by auth-wall, fallback to headless browser via Playwright (with active session cookies) or Apify.
- Data Extraction:
- Extract primary post text.
- Extract image URLs and send to
vision_analysisskill for alt-text generation. - Extract engagement metrics (Likes, Shares, Comments count).
- Knowledge Structuring: Convert the extracted data into a unified Markdown/JSON format compatible with
3_MEMORY/knowledge_items/.
🛡️ Cognitive Guardrails
- DO NOT: Attempt to scrape private profiles or closed groups without valid session cookies.
- DO NOT: Store Personally Identifiable Information (PII) of commenters. Strip all regular user names; only keep brand/page names.
- FALLBACK: If direct scraping fails, instruct the user to provide the raw HTML source of the page.
✅ Quality Validation Criteria (MANDATORY)
Before outputting "TASK COMPLETED", the agent MUST self-verify against these criteria:
- [ ] Criteria 1: Output matches the standard Knowledge Base
.mdschema. - [ ] Criteria 2: No placeholder text left in the extracted content.
- [ ] Criteria 3: Data privacy guardrails respected (no user PII).
- [ ] Criteria 4: Engagement metrics are accurately captured or explicitly marked as "N/A".
💻 Example Invocation (System Prompt Fragment)
<skill_usage_example>
User: "Cào nội dung bài viết này giúp mình: https://facebook.com/seosona/posts/123"
Action: Execute `social_ingestion_facebook` with input `{ "url": "https://facebook.com/seosona/posts/123", "extract_comments": false }`
Result: "[Knowledge Item created in 3_MEMORY]"
</skill_usage_example>
04 同仓库更多 Skills
web_crawler_katana
High-speed web crawling using Katana patterns for deep site mapping, URL discovery, and content extraction.
server_log_analyzer
Analyzes Nginx/Apache server logs to identify Googlebot crawl patterns, errors, and performance bottlenecks.
schema_markup_generator
Auto-generates JSON-LD structured data for any page type (Article, Product, FAQ, LocalBusiness, etc.).
internal_linking_optimizer
Analyzes and optimizes the internal link graph of a website for SEO authority distribution.
google_trends_analyzer
Detects trending topics and seasonal patterns using Google Trends data for content planning and keyword strategy.
brand_context_analyzer
Tracks brand mentions, sentiment, and online reputation across web sources.