# Cron Job: 春考选题-文章抓取

**Job ID:** 94d230f73e7f
**Run Time:** 2026-06-24 14:45:58
**Schedule:** every 120m

## Prompt

[IMPORTANT: You are running as a scheduled cron job. DELIVERY: Your final response will be automatically delivered to the user — do NOT use send_message or try to deliver the output yourself. Just produce your report/output as your final response and the system handles the rest. SILENT: If there is genuinely nothing new to report, respond with exactly "[SILENT]" (nothing else) to suppress delivery. Never combine [SILENT] with content — either report your findings normally, or say [SILENT] and nothing more.]

在服务器上抓取微信公众号最新文章，然后推送到企微群。

步骤：
1. cd /home/agentuser/project/scripts
2. 设置环境变量：export DEEPSEEK_API_KEY=$(grep DEEPSEEK_API_KEY ../.env | cut -d= -f2) && export QW_WEBHOOK_URL=$(grep QW_WEBHOOK_URL ../.env | cut -d= -f2-) && export WE_MP_RSS_AK=$(grep WE_MP_RSS_AK ../.env | cut -d= -f2) && export WE_MP_RSS_SK=$(grep WE_MP_RSS_SK ../.env | cut -d= -f2)
3. 运行 python3 -c "
import os, sys
sys.path.insert(0, '.')
from utils import send_qw_markdown
from fetch_articles import main as fetch_main

# Step 1: Fetch
fetch_main()

# Step 2: Check pending articles
from utils import load_pending
pending = load_pending()
articles = pending.get('articles', [])
new_articles = [a for a in articles if not a.get('processed')]

if not new_articles:
    print('No new articles to push')
else:
    # Push each new article
    count = 0
    for art in new_articles[:5]:  # max 5 per run
        title = art.get('title', '无标题')
        url = art.get('url', '')
        source = art.get('source', '未知来源')
        summary = art.get('summary', '')[:200]
        content = f'## 📰 {title}\n> 来源：{source}\n\n{summary}\n\n[阅读原文]({url})'
        if send_qw_markdown(content):
            art['processed'] = True
            count += 1
            print(f'Pushed: {title[:40]}')
    
    from utils import save_pending
    save_pending(pending)
    print(f'Total pushed: {count}/{len(new_articles)}')
" 2>&1

不用问我任何问题，直接执行。

## Response

## 执行结果：Fetch 失败 — WeMP RSS 服务已不可用

### 问题诊断

`api.wemp.com` 的抓取步骤失败，原因如下：

| 检查项 | 结果 |
|--------|------|
| `.env` 环境变量 | ✅ 四个变量均已配置 (DEEPSEEK_API_KEY, QW_WEBHOOK_URL, WE_MP_RSS_AK, WE_MP_RSS_SK) |
| HTTPS 连接 | ❌ SSL_ERROR_SYSCALL — 服务器在 TLS 握手阶段直接断开连接 |
| HTTP 连接 | ❌ 403 Forbidden — "Request forbidden by administrative rules" |
| 主站状态 | ❌ `www.wemp.com` 返回 `Server: Parking/1.0` — **域名已被停放** |

### 结论

**WeMP RSS (`wemp.com`) 服务已停止运营，域名处于停放（parked）状态。** 这不是 API Key 或脚本逻辑的问题，而是上游服务本身已经下线。因此：

- 无从抓取任何新文章
- 没有历史 `pending.json` 缓存可推送
- 本次运行 **无内容推送**

### 建议

需要替换数据源，改用其他微信公众号 RSS 服务（如 [Feeddd](https://feeddd.org/)、[WeRSS](https://werss.app/)、[微信公众号RSS](https://wechat2rss.xlab.app/) 等），并相应修改 `fetch_articles.py` 中的 API 地址和鉴权逻辑。
