feat: add weixin article download adapter & abstract download helpers#280
Merged
feat: add weixin article download adapter & abstract download helpers#280
Conversation
- New: src/clis/weixin/download.ts — WeChat article to Markdown adapter - New: src/download/article-download.ts — shared article download helper (TurndownService, image localization, frontmatter, customizable labels) - New: src/download/media-download.ts — shared media download helper (batch download, ProgressTracker, yt-dlp routing, auto cookie export) - Refactor: migrate zhihu/download to use downloadArticle() - Refactor: migrate xiaohongshu/download to use downloadMedia() - Refactor: migrate twitter/download to use downloadMedia() - Refactor: migrate bilibili/download to use downloadMedia() - Docs: add weixin to README, README.zh-CN, download docs, adapter docs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
weixin downloadadapter — export WeChat Official Account articles to Markdownarticle-download.ts— shared article download helper (TurndownService + image localization + customizable frontmatter)media-download.ts— shared media download helper (batch download + ProgressTracker + yt-dlp routing + auto cookie export/cleanup)Refactored
All 5 existing download adapters migrated to use the shared helpers:
zhihu/download.ts→downloadArticle()weixin/download.ts→downloadArticle()xiaohongshu/download.ts→downloadMedia()twitter/download.ts→downloadMedia()bilibili/download.ts→downloadMedia()Total: +775 / -427 lines (net reduction despite adding new feature)
Docs
Verification
zhihu/download.test.ts)