Preface¶
In the DSH environment, collecting articles from WeChat Official Accounts, analyzing creators, and exporting source cards usually involves multiple tools and a tedious workflow. dsh-wechat-collector is a DSH-native plugin that provides a right-side panel, toolset, first-run setup, QR code login flow, collection controls, feedback write-back, and ContentStudio import. It acts as a DSH layer responsible for interacting with the Python runtime (a reduced subset of pika-weixin-collection).
Installation and Enablement¶
The plugin is currently not listed in the directory marketplace and must be installed directly from GitHub. Use the following command:
dsh plugin --profile web add github:bescriptkiddie/dsh-wechat-collector
After installation, restart the DSH Web process (if the current environment does not support hot reloading) so that the Official Account entry appears in the right-side panel.
First Run (macOS)¶
On first use on macOS, select Install local runtime in the panel. The system downloads uv 0.12.6, verifies its SHA-256 checksum, deploys it to ~/.local/share/dsh-wechat-collector, and creates a current-user launchd service bound to 127.0.0.1:8000.
Core Features¶
The plugin provides the following DSH tools and panel capabilities:
- Runtime management: Install, start, stop, or uninstall the local runtime via the
wechat_collector_runtimetool. - Account login: Start the QR code login flow using
wechat_collector_login; credentials are stored as named configuration profiles and never enter the DSH main process. - Account management: Search, add, list, or remove tracked accounts via
wechat_collector_account. - Crawl control: Start collection, manage daily schedules, and adjust request interval policies via
wechat_collector_crawl(defaults to 20 seconds between accounts and 8 seconds between pages). - External source management: Manage external water sources such as RSS feeds via
wechat_collector_sources, helping alleviate official API rate limits. - Content preview: Read candidate articles using
wechat_collector_items. - Feedback write-back: Write human decisions into source items using
wechat_collector_feedback. - Analysis configuration: Inspect the analysis configuration or test endpoints via
wechat_collector_analysis_config. - Author analysis: Generate and view locally evidence-bounded creator analysis reports using
wechat_collector_author_analysis. - ContentStudio import: Idempotently create source cards using
wechat_collector_import_to_studio.
Credential Management and Rate Limiting¶
Each QR code login stores credentials as a named configuration profile, which can be switched at any time from the panel or tools. Credential values never enter DSH and are only stored as named configuration profiles. When crawling encounters HTTP 429 (rate limiting), it automatically stops and enters a cooldown period to prevent repeated requests from worsening the penalty window.
DeepSeek Creator Analysis¶
The analysis API key is provided through DSH credentials (DEEPSEEK_API_KEY), and plugin reports and settings never contain the key. Analysis limits are: a maximum of 6000 characters per article and 60000 characters in total. Generated reports are stored locally and can be viewed in the panel. Samples with fewer than five substantive articles are flagged.
ContentStudio Handoff¶
The plugin does not publish content to WeChat itself; it is responsible only for collection and import into ContentStudio. Use the wechat_collector_import_to_studio tool to create source cards. Formatting, draft upload, and final publication must still be completed in a separate ContentStudio workflow.
Use Cases and Notes¶
- System requirements: Requires Node.js 22.19.0 or higher.
- Data retention: Uninstalling the plugin preserves data, credentials, and runtime files.
- Platform differences: First-run setup is currently described for macOS. On Windows/Linux, you must manually ensure the runtime is available or connect via
collectorBaseUrl.
Short Conclusion¶
dsh-wechat-collector integrates the WeChat Official Account collection, analysis, and ContentStudio handoff workflow into the DSH ecosystem. Through local runtime management, credential isolation, and rate control, it provides standardized infrastructure for creator analysis. For more details, see the GitHub repository.