Wechat Mp Fetch

Data & APIs

WeChat Official Account article fetcher — extracts title, body text, and final URL from mp.weixin.qq.com links via Playwright. 微信公众号文章抓取工具,提取标题、正文、原始URL,支持重定向处理。

Install

openclaw skills install wechat-mp-fetch

📖 WeChat Article Fetch | 微信公众号文章抓取

Extract article title, body text, and original URL from WeChat Official Account links (mp.weixin.qq.com)


✨ Features | 功能

  • 🎯 Title Extraction — Extracts article title from rendered page
  • 📝 Body Text — Extracts clean text content from #js_content
  • 🔗 URL Resolution — Handles redirects, returns final canonical URL
  • 🌐 Full Rendering — Uses Playwright/Chromium for JS-heavy pages
  • 🔒 Privacy First — 100% local, no data uploaded anywhere

🚀 Quick Start

Installation

cd <skill-path>
npm install
npx playwright install chromium

Usage

node scripts/wx-article-fetch.js "https://mp.weixin.qq.com/s/xxxxx"

Output

{
  "success": true,
  "title": "文章标题",
  "content": "正文内容...",
  "url": "https://mp.weixin.qq.com/s/xxxxx"
}

💡 Usage Scenarios | 使用场景

ScenarioDescription场景
📚 Content ArchivalSave articles for offline reading文章离线保存
📝 Note-takingConvert articles to notes文章转笔记
🔍 ResearchBatch collect article content批量采集资料
✍️ Writing ReferenceExtract key info for writing写作素材收集
🔄 Content RepurposingExtract text for rewriting内容再创作

⚠️ Known Limitations | 已知限制

IssueDescription
🔐 Login RequiredSome articles require WeChat login
💰 Paid ContentPaywalled articles cannot be fetched
🔒 Private AccountsPrivate official accounts inaccessible
🖼️ ImagesCurrently extracts text only; images keep original URLs

🔧 Technical Details | 技术细节

  • Rendering Engine: Playwright + headless Chromium
  • Content Selector: #js_content container
  • No External APIs: All processing is 100% local
  • Browser Mode: Headless, no UI, no state leakage

🛡️ Security & Privacy

  • 100% Local — All operations run in local browser, no external server
  • No Login Required — No WeChat credentials needed
  • No Data Storage — Content exists only in caller's session
  • No Tracking — No analytics, no telemetry, no third-party deps

📁 Project Structure

wechat-mp-fetch/
├── _meta.json
├── SKILL.md
├── package.json
├── package-lock.json
└── scripts/
    └── wx-article-fetch.js    # Main script

🔗 Links