mcpField
W
wechat-article-to-markdown

wechat-article-to-markdown

github.com/jackwenerDocuments1.1k924 installsUpdated 31w ago
Repository

About wechat-article-to-markdown

wechat-article-to-markdown fetches WeChat Official Account articles and converts them into Markdown files, with images saved locally. It is for archiving articles or preparing them for summarization and knowledge-base ingestion.

Key features

  1. 01Fetch public WeChat article URLs
  2. 02Extract article metadata
  3. 03Save images locally with concurrent downloads
  4. 04Convert HTML and code snippets to Markdown

Use cases

  1. 01Archive a WeChat article locally
  2. 02Prepare article text for AI summarization
  3. 03Ingest article content into a knowledge base

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/jackwener/wechat-article-to-markdown --skill wechat-article-to-markdown

After installing, type/wechat-article-to-markdownin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

requirements.txt
pyproject.toml
main.py
.gitignore
README.md
wechat_article_to_markdown.py
.github/workflows/
ci.yml
release.yml
publish.yml
e2e.yml
tests/
test_core.py
test_e2e_live.py

Details

From the project README

WeChat Article to Markdown

Fetch a WeChat Official Account article and convert it to a clean Markdown file.

When to use

Use this skill when you need to save WeChat articles as Markdown for:

  • Personal archive
  • AI summarization input
  • Knowledge base ingestion

Prerequisites

  • Python 3.8+
# Install
uv tool install wechat-article-to-markdown
# Or: pipx install wechat-article-to-markdown

Usage

wechat-article-to-markdown "<WECHAT_ARTICLE_URL>"

Input URL format:

  • https://mp.weixin.qq.com/s/...

Output files:

  • <cwd>/output/<article-title>/<article-title>.md
  • <cwd>/output/<article-title>/images/*

Features

  1. Anti-detection fetch with Camoufox
  2. Metadata extraction (title, account name, publish time, source URL)
  3. Image localization to local files
  4. WeChat code-snippet extraction and fenced code block output
  5. HTML to Markdown conversion via markdownify
  6. Concurrent image downloading

Limitations

  • Some code snippets are image/SVG rendered and cannot be extracted as source code
  • Public mp.weixin.qq.com URL is required

Comments

Markdown supported