TopRank Skills

Home / Claw Skills / Git / GitHub / wechat-article-extractor
Official OpenClaw rules 54%

wechat-article-extractor

Extract metadata and content from WeChat Official Account articles. Use when user needs to parse WeChat article URLs (mp.weixin.qq.com), extract article info (title, author, content, publish time, cover image), or convert WeChat articles to structured data. Supports various article types including posts, videos, images, voice messages, and reposts.

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 wechat-article-extractor 技能。 若已安装,则直接安装 wechat-article-extractor 技能。

Overview

Skill Key
freestylefly/wechat-article-extractor-skill
Author
freestylefly
Source Repo
openclaw/skills
Version
-
Source Path
skills/freestylefly/wechat-article-extractor-skill
Latest Commit SHA
919689c8185e8fa0f6b72a183159d0e50a674c7e

Extracted Content

SKILL.md excerpt

# WeChat Article Extractor

Extract metadata and content from WeChat Official Account (微信公众号) articles.

## Capabilities

- Parse WeChat article URLs (`mp.weixin.qq.com`)
- Extract article metadata: title, author, description, publish time
- Extract account info: name, avatar, alias, description
- Get article content (HTML)
- Get cover image URL
- Support multiple article types: post, video, image, voice, text, repost
- Handle various error cases: deleted content, expired links, access limits

## Usage

### Basic Extraction from URL

```javascript
const { extract } = require('./scripts/extract.js');

const result = await extract('https://mp.weixin.qq.com/s?__biz=...');
// Returns: { done: true, code: 0, data: {...} }
```

### Extraction from HTML

```javascript
const html = await fetch(url).then(r => r.text());
const result = await extract(html, { url: sourceUrl });
```

### Options

```javascript
const result = await extract(url, {
  shouldReturnContent: true,      // Return HTML content (default: true)
  shouldReturnRawMeta: false,     // Return raw metadata (default: false)
  shouldFollowTransferLink: true, // Follow migrated account links (default: true)
  shouldExtractMpLinks: false,    // Extract embedded mp.weixin links (default: false)
  shouldExtractTags: false,       // Extract article tags (default: false)
  shouldExtractRepostMeta: false  // Extract repost source info (default: false)
});
```

## Response Format

### Success Response

```javascript
{
  done: true,
  code: 0,
  data: {
    // Account info
    account_name: "公众号名称",
    account_alias: "微信号",
    account_avatar: "头像URL",
    account_description: "功能介绍",
    account_id: "原始ID",
    account_biz: "biz参数",
    account_biz_number: 1234567890,
    account_qr_code: "二维码URL",

    // Article info
    msg_title: "文章标题",
    msg_desc: "文章摘要",
    msg_content: "HTML内容",
    msg_cover: "封面图URL",
    msg_author: "作者",
    msg_type: "post", // post|video|image|voi...

README excerpt

# WeChat Article Extractor

[![Node.js](https://img.shields.io/badge/Node.js-14+-green.svg)](https://nodejs.org/)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

一个 Claude Code Skill,用于提取微信公众号文章的元数据和内容。支持多种文章类型,包括图文、视频、图片集、语音和转载文章。当用户需要提供微信公众号文章链接(mp.weixin.qq.com)时,Claude 会自动触发此 Skill 来提取文章信息。

## 功能特性

- 解析微信公众号文章 URL (`mp.weixin.qq.com`)
- 提取文章元数据:标题、作者、摘要、发布时间
- 获取公众号信息:名称、头像、微信号、功能介绍
- 提取文章内容(HTML 格式)
- 获取封面图片 URL
- 支持多种文章类型:图文、视频、图片集、语音、纯文字、转载
- 处理各种异常情况:内容删除、链接过期、访问限制、账号迁移等
- 支持搜狗微信搜索结果的解析 (`weixin.sogou.com`)
- 可选提取文章标签和内嵌链接

## 安装

这是一个 Claude Code Skill,可以通过以下方式安装:

### 通过 Claude Code 安装(推荐)

在 Claude Code 中运行:

```
/skill install wechat-article-extractor
```

或指定目录安装:

```
/skill install /path/to/wechat-article-extractor-skill
```

### 手动克隆安装

```bash
git clone https://github.com/yourusername/wechat-article-extractor-skill.git
cd wechat-article-extractor-skill
npm install
```

然后在 Claude Code 中将该目录作为 Skill 加载。

## 使用方法

### 基本用法 - 从 URL 提取

```javascript
const { extract } = require('./scripts/extract.js');

async function main() {
  const url = 'https://mp.weixin.qq.com/s?__biz=...&mid=...&idx=...&sn=...';
  const result = await extract(url);

  if (result.done) {
    console.log('文章标题:', result.data.msg_title);
    console.log('公众号:', result.data.account_name);
    console.log('发布时间:', result.data.msg_publish_time_str);
  } else {
    console.error('提取失败:', result.msg);
  }
}

main();
```

### 从 HTML 内容提取

如果你已经获取了页面 HTML,可以直接传入:

```javascript
const { extract } = require('./scripts/extract.js');

async function main() {
  const html = await fetch(url).then(r => r.text());
  const result...

Related Claw Skills