WeChat Article Reader
URL Normalization
Critical: The URL must end with ?scene=1 (not &scene=1), otherwise a CAPTCHA will be triggered.
Rules:
- - No query params → append INLINECODE2
- Has existing
? params → parse and rewrite query to include INLINECODE4
Steps
- 1. Open the page with INLINECODE5
- Wait for content with INLINECODE6
- Extract body text with INLINECODE7
- Return plain text content
- Close the tab with INLINECODE8
Troubleshooting
- - CAPTCHA → verify the URL has INLINECODE9
- Empty content → page may not have fully loaded, retry INLINECODE10
- Deleted article → the page will display a notice
微信公众号文章阅读器
URL规范化
关键:URL必须以?scene=1结尾(而非&scene=1),否则会触发验证码。
规则:
- - 无查询参数 → 追加?scene=1
- 已有?参数 → 解析并重写查询,包含scene=1
步骤
- 1. 使用browser open ?scene=1打开页面
- 使用browser wait #jscontent --load networkidle等待内容加载
- 使用browser evaluate --fn () => document.querySelector(#jscontent)?.innerText || document.querySelector(.richmediacontent)?.innerText || document.body.innerText提取正文文本
- 返回纯文本内容
- 使用browser close 关闭标签页
故障排除
- - 验证码 → 确认URL包含?scene=1
- 内容为空 → 页面可能未完全加载,重试browser wait
- 文章已删除 → 页面将显示通知