360 Secure SkillHub
360 安全技能中心

asdsadasd

端到端内容流水线 Skill:用 requests/BeautifulSoup 或 Apify 抓取网页与 Facebook 内容,调用 Google Gemini 改写为社媒文案,可选 DALL-E 3 生成配图,再通过 Facebook Graph API 发布到主页,支持批量处理与 JSON 报告。

yunneetoichoi
yunneetoichoi
热度 83.48
最近更新 2026-05-18 12:29:19
分类:营销依赖:代码执行 / 读写文件 / 第三方 API / 内部调用大模型应用场景:社交媒体 / 文案创作 / 图像生成 / 工作流 ...

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add asdsadasd
Metadata
name
ai-content-pipeline
description
An end-to-end AI Content Pipeline that crawls articles, rewrites them using Google Gemini, and automatically publishes to Facebook Fanpage.
version
2.0.0
env
["GEMINI_API_KEY","APIFY_API_TOKEN","FB_APP_ID","FB_APP_SECRET","FB_PAGE_ID","FB_PAGE_ACCESS_TOKEN"]

🤖 OpenClaw AI Content Pipeline (Analyze + Publish)

Purpose

This is a production-ready OpenClaw Skill that merges a Web Crawler, an AI Rewriter (Google Gemini), and a Facebook Auto-Publisher into one seamless pipeline. It reads URLs (news articles or Facebook posts), rewrites them into engaging social media captions, and posts them directly to your Fanpage.

Core Capabilities

  • Analyze Mode: Extracts data from URLs via Python requests/BeautifulSoup (for static news) or Apify (for JS-heavy content like Facebook). Generates localized rewritten text via Gemini 2.5 Flash.
  • Publish Mode: Pushes the generated content directly to a Facebook Page via Graph API v21.0.
  • Batch Processing: Can ingest URLs line-by-line from a text file, process them in bulk, and save JSON reports.

Architecture Map

  • run.bat / main.py ← Central Orchestrators (CLI Entry points)
  • agents/crawler_agent.py ← Hybrid Crawler (Native + Apify API)
  • agents/writer_agent.py ← AI Content Generator (Gemini Integration)
  • agents/fb_publisher_agent.py ← Graph API Poster (Messages & Images)
  • config.py ← Environment Loader & System Validation

Setup & Environment

Ensure you create a .env file at the root with the following variables:

# AI Models
GEMINI_API_KEY=...
OPENAI_API_KEY=...    # Optional: For DALL-E 3 image generation

# Scraping
APIFY_API_TOKEN=...

# Facebook Graph API
FB_APP_ID=...
FB_APP_SECRET=...
FB_PAGE_ID=...
FB_PAGE_ACCESS_TOKEN=...

Usage commands

From your terminal, run the following commands (Windows run.bat wrappers):

1. Analyze (Test scrape and text rewrite)

# Analyze a single URL
run.bat analyze "https://vnexpress.net/..."

# Analyze and save as JSON
run.bat analyze "https://dantri.com.vn/..." --save

# Batch analyze from a text file
run.bat analyze-file urls.txt

2. Publish (Post directly to Facebook)

# Test Graph API Token connection
run.bat test
run.bat test-post

# Full pipeline (Crawl -> Rewrite -> Post to Fanpage)
run.bat run "https://dantri.com.vn/..."

# Pipeline dry-run (No actual post)
run.bat dry "https://dantri.com.vn/..."