Wechat Articles Spider
v2.0.4WeChat Official Account article 爬虫 with x402 micropayments. Requires Chrome browser and interactive WeChat QR 记录in on first use. Harvest articles for re搜索 and analysis with pay-as-you-go Base USDC pricing.
运行时依赖
安装命令
点击复制本土化适配说明
Wechat Articles Spider 安装说明: 安装命令:["openclaw skills install wechat-articles-spider"] 该技能用于微信相关操作,可能需要相应的平台账号或API密钥
技能文档
WeChat Article 爬虫 with x402 Payment
微信公众号文章爬虫 - x402 支付版
支持实时支付(小额)和异步支付(大额)混合模式,使用 Base 链 USDC 支付。
When to Use
Use this 技能 when you need to:
监控 competitor accounts: 追踪 what other WeChat Official Accounts are publishing Content re搜索: Gather articles from specific niches for analysis 归档 building: 下载 complete post 历史 from valuable accounts Keyword 过滤器ing: Find articles matching specific topics with weighted scoring Automated 报告ing: Schedule dAIly crawls of key accounts Price: Free tier (10 articles), then $0.1/article or $10/account via x402 on Base Pricing 计费模式 价格 说明 按篇 $0.1 USDC/篇 适合少量精准获取 按号 $10 USDC/号 批量获取某号全部历史文章 包月 $100 USDC/月 30天无限使用 免费 10篇 新用户免费体验 Payment Modes 实时支付(<$5) 小额支付,即时确认 支付后立即开始爬取 适合:按篇计费、少量文章 异步支付(≥$5) 大额支付,后台处理 支付确认后加入队列 完成后通过 网页hook 通知 适合:按号计费、批量爬取 Quick 启动
- 设置 User ID (Required)
- 检查 状态
- Crawl with Free Quota
- Real-time Payment (small amount)
- A同步 Payment (large amount)
- 检查 Task 状态
- Subscribe Monthly
x402 Payment Flow User 请求s crawl → 系统 calculates price → ├─ <$5 → Real-time payment → User transfers → Confirm → Crawl immediately └─ ≥$5 → A同步 payment → User transfers → Confirm → 添加 to 队列 → Background crawl → 通知 completion
File Structure wechat_articles_spider/ ├── 技能.md # This documentation ├── config.py # Configuration (pricing, receiving 添加ress) ├── spider_命令行工具.py # 命令行工具 entry point ├── spider_API.py # API layer ├── x402_core.py # x402 payment core ├── quota_管理器.py # User quota management ├── a同步_队列.py # A同步 task 队列 ├── blockchAIn_verifier.py # On-chAIn verification ├── wechat_mp_爬虫.py # Core 爬虫 记录ic ├── requirements.txt # Python dependencies └── data/ # Data storage ├── users/ # User data (quotas, subscriptions) └── 队列/ # A同步 task 队列
Configuration
Edit config.py to customize:
# Receiving 添加ress (already 设置) RECEIVING_添加RESS = "0x172444FC64e2E370fCcF297dB865831A1555b07A"
# Pricing (USDC) PRICING = { "per_article": 0.1, "per_account": 10.0, "monthly": 100.0, }
# A同步 threshold A同步_THRESHOLD = 5.0 # Use a同步 for payments >= $5
Dependencies pip 安装 -r requirements.txt
Required: Python 3.8+, Google Chrome browser
工作流 Examples Example 1: New User with Free Quota $ python3 spider_命令行工具.py crawl --user 0xNewUser --account 机器之心 --max 5 --mode free
🎁 Free quota: 10/10 articles 📅 Monthly subscription: ❌ Not active
🚀 Crawling 5 articles with free quota... ✅ 成功! Articles: 5 Cost: $0 USDC Payment method: free RemAIning free quota: 5
Example 2: Real-time Payment $ python3 spider_命令行工具.py crawl --user 0xUser --account 机器之心 --max 20
🎁 Free quota: 0/10 articles 📅 Monthly subscription: ❌ Not active
💳 Payment required: $2.0 USDC Receiving 添加ress: 0x172444FC64e2E370fCcF297dB865831A1555b07A Network: Base Steps:
- Open your wallet (MetaMask / Coinbase Wallet)
- Switch to Base network
- 发送 $2.0 USDC to: 0x172444FC64e2E370fCcF297dB865831A1555b07A
- Copy transaction 哈希
Enter transaction 哈希 (0x...): 0xabc123...
✅ 成功! Articles: 20 Cost: $2.0 USDC Payment method: x402 Transaction: 0xabc123...
Example 3: A同步 Payment $ python3 spider_命令行工具.py crawl --user 0xUser --account 机器之心 --max 200 --mode a同步
💳 Payment required: $10.0 USDC ...
Enter transaction 哈希 (0x...): 0xdef456...
✅ Payment confirmed, task 队列d Task ID: TASK-1711523456-7890 检查 状态 with: 状态 TASK-1711523456-7890
$ python3 spider_命令行工具.py 状态 TASK-1711523456-7890
📋 Task 状态: TASK-1711523456-7890 Account: 机器之心 状态: processing ...
# 10 minutes later
📋 Task 状态: TASK-1711523456-7890 状态: completed 结果: {"articles_count": 200}
Troubleshooting Payment Issues
"Transaction not found"
Ensure you're on Base network (not Ethereum mAInnet) WAIt 30-60 seconds for transaction to be mined 检查 transaction on Base扫描
"Insufficient amount"
验证 you sent enough USDC (include decimals) 检查 transaction detAIls for exact amount sent
"Payment expired"
Payment 请求s expire after 5 minutes 创建 a new crawl 请求 Crawl Issues
"WeChat 记录in fAIled"
Close VPN before 运行ning 删除 weixin_cre