Adgai115

微信文章抓取器 - 安全版

Data Analysisv2.0.1
By Adgai115Updated 2026-05-114 versions · latest released 2026-04-22wechat-article-fetcher-safe@clawhub_adgai115/wechat-article-fetcher-safe
Web Scraping#WeChat#微信

According to AlphaMoat, as of 2026-09, 微信文章抓取器 - 安全版 has 3,002 downloads and 3 stars — ranked #3,729 of 5,078 AI skills overall, and #280 of 399 in Data Analysis.

Installs
359
Downloads
3.0K
Stars
3
Overall Rank
#3,729
Top 74% overall · Top 71% in Data Analysis
PlatformInstallsDownloadsStarsComments
ClawHub ↗261.1K1-
SkillHub ↗3593.0K3—

Platforms count differently and update at different times.

What this skill does

It uses Node.js, puppeteer-core and local Chrome or Chromium to render accessible articles, collect text and metadata and optionally save Markdown, HTML, plain text or images. It does not support login-required or paid articles or OCR of image text. The documented browser disables its sandbox: use trusted WeChat URLs in a restricted environment, and limit or disable image downloads unless needed.

Profile published 2026-10-27

What you can do with it

  • Archive accessible WeChat article text and metadata

When to use it

  • When an accessible public-account article needs a local extraction workflow

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Check the article URL and local browser requirements, prepare restricted extraction and avoid unnecessary image downloads.

Monthly Trend

Downloads3.0K
3441.8K3.2K2026-03 · Downloads 5412026-05 · Downloads 1.4K2026-06 · Downloads 1.6K2026-07 · Downloads 2.0K2026-08 · Downloads 2.3K2026-09 · Downloads 3.0K26-0326-09
Stars3
0232026-03 · Stars -2026-05 · Stars 22026-06 · Stars 32026-07 · Stars 32026-08 · Stars 32026-09 · Stars 326-0326-09

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-093.0K—3
2026-082.3K+14.7%3
2026-072.0K+22.6%3
2026-061.6K+17.4%3
2026-051.4K—2
2026-03541—-

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

4.1 KB · ClawHub v2.0.1
# WeChat Article Fetcher - 微信文章抓取技能

> 使用 Puppeteer + Chrome 本地提取微信公众号文章内容。

---

## 📋 技能信息

| 字段 | 值 |
|------|-----|
Show all (209 lines)
| **技能名称** | wechat-article-fetcher-safe |
| **版本** | 2.0.0 |
| **作者** | @Adgai115 |
| **创建时间** | 2026-03-21 |
| **更新时间** | 2026-04-22 |
| **适用场景** | 微信公众号文章内容提取 |
| **技术栈** | Node.js + Puppeteer + Chrome |
| **仓库** | https://github.com/Adgai115/wechat-article-fetcher-safe |

---

## 🎯 功能

### ✅ 支持
- 微信公众号文章全文提取
- 文章元信息获取(标题、作者、时间)
- 文章图片下载保存(原图下载 + Markdown 嵌入链接)
- 移动端 User-Agent 适配
- JavaScript 渲染页面支持
- 输出格式:Markdown / 纯文本 / HTML
- 自动保存为文件
- 错误处理和超时保护

### ❌ 不支持
- 需要登录的文章
- 付费阅读内容
- 图片内文字 OCR 识别(仅下载图片原文件)

---

## 📦 安装

### 1. 确认环境

```bash
node -v  # 需要 v18+
```

### 2. 安装依赖

```bash
cd wechat-article-fetcher-safe
npm install
```

### 3. Chrome 路径

脚本会自动检测 Chrome 路径。如检测失败,修改脚本中的 `chromePath`。

**Windows 标准路径:**
```
C:\Program Files\Google\Chrome\Application\chrome.exe
```

---

## 🚀 使用方法

### 命令行

```bash
node fetch-wechat-article.js https://mp.weixin.qq.com/s/xxx
```

### 作为 OpenClaw Skill 调用

```javascript
const { fetchWechatArticle } = require('./fetch-wechat-article');

const result = await fetchWechatArticle({
  url: 'https://mp.weixin.qq.com/s/xxx',
  saveToFile: true,
  outputDir: './output'
});

console.log(result.title);
console.log(result.content);
```

---

## 📝 输出示例

```
========== 文章信息 ==========

标题:文章标题
作者:公众号名称
时间:发布日期

========== 文章内容 ==========

(正文内容)

========== 文章结束 ==========

内容已保存到:./article-wechat-xxxxx.txt
```

---

## 🔑 核心实现

### 1. Chrome 无头模式

```javascript
const browser = await puppeteer.launch({
  executablePath: chromePath,
  headless: true,
  args: ['--no-sandbox', '--disable-gpu']
});
```

### 2. 移动端 User-Agent

```javascript
await page.setUserAgent('Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 ...) MicroMessenger/8.0.0');
await page.setViewport({ width: 375, height: 812 });
```

### 3. 内容提取

```javascript
const articleData = await page.evaluate(() => {
  const title = document.querySelector('#activity-name')?.innerText;
  const content = document.querySelector('#js_content')?.innerText;
  return { title, content };
});
```

---

## ⚠️ 常见问题

### 找不到 Chrome

脚本会自动检测以下路径:
- `C:\Program Files\Google\Chrome\Application\chrome.exe`
- `C:\Program Files (x86)\Google\Chrome\Application\chrome.exe`
- `/usr/bin/google-chrome`
- `/Applications/Google Chrome.app/Contents/MacOS/Google Chrome`

### 提取内容为空

1. 文章可能需要登录
2. 增加等待时间:`await page.waitForSelector('#js_content', { timeout: 30000 })`

---

## 📁 文件结构

```
wechat-article-fetcher-safe/
├── SKILL.md                    # 技能文档(本文件)
├── fetch-wechat-article.js     # 主脚本
├── package.json                # npm 配置
├── README.md                   # 快速入门
└── README.github.md            # GitHub 展示文档
```

---

## 🔒 隐私说明

- 所有操作在本地完成
- 不发送数据到任何外部服务器
- 不收集用户信息
- 源代码完全公开可审查

---

## 📝 更新日志

### v2.0.0 (2026-04-22)
- 清理冗余文件
- 更新仓库地址
- 移除不必要的 OCR 依赖
- 优化文档

### v1.1.0 (2026-03-25)
- 重命名为安全版 (safe)
- 优化正文提取和失败识别
- 自动探测 Chrome 路径

### v1.0.0 (2026-03-21)
- 初始版本

---

## 📄 许可证

MIT-0 (MIT No Attribution)

---

**仓库**:https://github.com/Adgai115/wechat-article-fetcher-safe
**维护者**:@Adgai115
**最后更新**:2026-04-22

Popular in Data Analysis

AdMapixData Analysis

The data layer for AdMapix: turn ad and app queries into API calls that return raw JSON only.

↓ 365.6K★ 304fly0pants
Tavily SearchData Analysis

Searches the public web through Tavily and returns structured results with links and snippets.

↓ 121.9K★ 286Xiaoran Li
Data AnalysisData Analysis

A data-analysis skill that turns databases, spreadsheets, and raw exports into decision-ready conclusions.

↓ 101.2K★ 244Iván
Stock AnalysisData Analysis

A skill that analyzes stocks and cryptocurrencies on Yahoo Finance data and tracks a portfolio.

↓ 75.3K★ 299udiedrichsen
Stock WatcherData Analysis

Manages a local stock watchlist and summarizes recent quotes for its codes from the Tonghuashun stock pages.

↓ 64.8K★ 122Robin797860
全国招标中标查询及分析【知了标讯】Data Analysis

全网招中标数据查询与分析助手。当用户涉及以下任何场景时,必须使用此SKILL:查询招标/中标公告、搜索标讯、查找临期/即将到期项目、商机预测、推荐潜在投标供应商、分析公司主营业务/历史中标、查询公司上下游合作客户与供应商、分析竞争对手/竞对企业、查询Top采购单位/Top中标单位/Top中标品牌、招中标数据统计分析(按月/季/年/省份/品牌等维度)、查询品牌型号历史中标单价/价格趋势、市场分析/行业分析/采购寻源/渠道拓展等采购与投标相关场景。即使用户没有提到「知了标讯」,只要涉及招投标、采购、中标、供应商、竞争对手等关键词,都应使用本SKILL。

↓ 56.5K★ 13user_98035bfb
BlogwatcherData Analysis

Track blog and RSS/Atom feed updates from the command line.

↓ 54.0K★ 75Peter Steinberger
Model UsageData Analysis

Summarises per-model usage cost for Codex or Claude.

↓ 49.5K★ 114Peter Steinberger

Data month: 2026-09 · Downloads, stars and installs are aggregated monthly from public skill registries (ClawHub, SkillHub). See methodology.