自动生成并投递每日科技与金融新闻简报,配合AI评论,通过QQ、Telegram或Discord渠道发送,使用百度API或DuckDuckGo搜索获取信息。
Automated daily news briefing system that generates comprehensive tech and financial reports with AI-powered commentary and delivers them via configured messaging channels. Supports dual-search architecture with Baidu API (preferred when configured) and DuckDuckGo fallback (always available, no API key required).
Option A: From ClawHub (Published)
bash
# Search and install
clawhub search daily-news-briefing
clawhub install daily-news-briefing
# Verify installation
ls ~/.openclaw/skills/daily-news-briefing/
Option B: From Local Directory
bash
# Copy skill to OpenClaw skills directory
cp -r /path/to/daily-news-briefing ~/.openclaw/skills/
# Verify structure
ls ~/.openclaw/skills/daily-news-briefing/scripts/
Note: The skill has a built-in fallback to DuckDuckGo if no Baidu API key is configured. Baidu API provides better structured data, but DuckDuckGo works perfectly fine without any API keys.
With Baidu API (Recommended for Better Results):
Create a configuration file with your Baidu Search API key:
Option A: System-wide (Recommended for servers)
bash
# Create config file
sudo nano /etc/profile.d/daily-news-briefing.sh
# Add your configuration
export BAIDU_API_KEY="bce-v3/ALTAK-your-api-key-here"
export NEWS_TARGET_USER="9C12E02D9038B14FCEDCE1B69AAEAB3F" # QQ user ID
export NEWS_CHANNEL="qqbot" # qqbot, telegram, discord
# Reload configuration
source /etc/profile.d/daily-news-briefing.sh
Option B: User-specific
bash
# Add to ~/.bashrc or ~/.zshrc
echo 'export BAIDU_API_KEY="your-api-key"' >> ~/.bashrc
echo 'export NEWS_TARGET_USER="target-user-id"' >> ~/.bashrc
source ~/.bashrc
Without API Key (Uses DuckDuckGo):
The skill will automatically use DuckDuckGo web search if no Baidu API key is configured:
bash
# Just set target user and channel - that's it!
export NEWS_TARGET_USER="your-qq-user-id"
export NEWS_CHANNEL="qqbot"
Compare Search Methods:
FeatureBaidu APIDuckDuckGoAPI Key Required✅ Yes (75 chars)❌ NoResult Quality🏆 Better structured data👍 Good for most use casesRate Limits⚠️ API quota applies✅ NoneSetup Time~2 mins (get API key)0 mins (works out of box)Content PreviewFull article snippetsTitle + URL only
Recommendation: Start with DuckDuckGo to test quickly, add Baidu API later if you need better content previews.
Edit the delivery script to match your preferences:
bash
nano ~/.openclaw/skills/daily-news-briefing/scripts/deliver-briefing.sh
Key settings to modify:
bash
# Change target user ID
TARGET_USER="your-qq-user-id" # Line ~10
# Change delivery channel (--channel parameter)
--channel qqbot # QQ Bot (default)
--channel telegram # Telegram
--channel discord # Discord
For daily delivery at 9:00 AM:
bash
# Edit crontab
crontab -e
Add these lines (adjust paths if needed):
cron
# Generate news at 9:00 AM
0 9 * * * source /etc/profile && cd ~/.openclaw/skills/daily-news-briefing/scripts && python3 generate-briefing.py >> /var/log/daily-news.log 2>&1
# Deliver at 9:01 AM
1 9 * * * source /etc/profile && bash ~/.openclaw/skills/daily-news-briefing/scripts/deliver-briefing.sh >> /var/log/news-delivery.log 2>&1
Custom delivery times:
TimeCron Entry (Generate + Deliver)Use Case7:00 AM0 7 * * * ...
1 7 * * * ...Early morning briefing7:30 AM30 7 * * * ...
31 7 * * * ...After system fully up (recommended)6:00 PM0 18 * * * ...
1 18 * * * ...Evening summary
Test API Key:
bash
python3 -c "from generate_briefing import search_baidu; print(search_baidu('test', count=1))"
Generate News Manually:
bash
cd ~/.openclaw/skills/daily-news-briefing/scripts
python3 generate-briefing.py
Check log: tail -20 /var/log/daily-news.log
Test Delivery:
bash
bash deliver-briefing.sh
Check log: tail -30 /var/log/news-delivery.log
Verify Cron is Running:
bash
# Check cron service
systemctl status cron
# View scheduled jobs
crontab -l
# Check last execution
grep "Starting news generation" /var/log/daily-news.log | tail -1
Modify search queries in generate-briefing.py:
python
# Line ~85-90, customize keywords
china_tech = search_baidu('科技新闻 人工智能 芯片 AI 华为', count=3)
intl_tech = search_baidu('NVIDIA Broadcom Apple Microsoft AI', count=3)
china_finance = search_baidu('A 股 上证指数 港股 财经', count=3)
intl_finance = search_baidu('美股 纳斯达克 道琼斯 比特币', count=3)
Adjust article count: Change count=3 to 1-5 articles per category.
Customize AI commentary rules: See references/CONFIGURATION.md for pattern examples.
See references/ for:
Edit crontab lines (format: minute hour day month weekday):
cron
# 7:30 AM delivery
30 7 * * * ...
31 7 * * * ...
# 6:00 AM delivery
0 6 * * * ...
1 6 * * * ...
Edit queries in generate-briefing.py:
python
china_tech = search_baidu('科技新闻 人工智能 芯片 AI 华为', count=3)
intl_tech = search_baidu('NVIDIA Broadcom Apple Microsoft AI', count=3)
See references/API_REFERENCE.md for commentary rule patterns.
No results from Baidu API:
BAIDU_API_KEY is set and valid (length > 20 chars)/var/log/daily-news.log for detailed errorsDelivery fails:
/var/log/news-delivery.logopenclaw --versionWrong headlines extracted:
## 🖥️ and ## 📈 sectionsThe skill supports any OpenClaw-configured messaging channel:
ChannelTarget FormatExample ValueNotesQQBotc2c:USERID``c2c:9C12E02D...Default, for private QQ messagesTelegram@username or chat ID@mychannel or 123456789Bot must be added to channelDiscordguild-id/channel-id``1234567890/9876543210Bot needs permissionsSlack#channel-name or @user``#general or U123456Slack app configured
Method 1: Environment Variable
bash
export NEWS_CHANNEL="telegram" # qqbot, telegram, discord, slack
export NEWS_TARGET_USER="@mychannel" # Channel-specific target
Method 2: Edit deliver-briefing.sh
Find line ~50 and modify:
bash
--channel qqbot # Change to your preferred channel
-t "qqbot:c2c:${TARGET_USER}" # Update target format per channel
For Telegram:
openclaw statusNEWS_TARGET_USER="@channelname" or numeric IDFor Discord:
guild-id/channel-idopenclaw message send --channel discord -t "GUILD/CHANNEL" -m "Test"For QQBot:
Generated briefing includes:
Delivery message includes:
<qqfile> attachment tag for full markdown reportLog FileLocationPurposeNews generation/var/log/daily-news.logSearch results, article counts, errorsDelivery attempts/var/log/news-delivery.logSend status, fallback methods used
View recent logs:
bash
# Today's news generation
tail -50 /var/log/daily-news.log
# Latest delivery result
grep "completed\|ERROR" /var/log/news-delivery.log | tail -10
No results from Baidu API:
BAIDU_API_KEY is set and valid (length > 20 chars)/var/log/daily-news.log for "Found X results" messagespython3 -c "from generate_briefing import search_baidu; print(search_baidu('test', count=1))"No results from any source:
ping -c 2 duckduckgo.comcurl -s "https://html.duckduckgo.com/html/?q=test"/var/log/daily-news.log for detailed error messagesDelivery fails:
/var/log/news-delivery.log for specific erroropenclaw --versionbash deliver-briefing.shWrong headlines extracted:
## 🖥️ 中国科技新闻) and English headersCron job not running:
systemctl status croncrontab -lCheck which search method is being used:
bash
# View log file
grep "Search method used" /var/log/daily-news.log | tail -1
# Or check footer of generated news file
tail -5 ~/daily-news-$(date +%Y%m%d).md
Expected output: 📊 Search method used: baidu or 📊 Search method used: duckduckgo
daily-news-YYYYMMDD.md/var/log/daily-news.log and /var/log/news-delivery.logVersion: 1.0
Last Updated: 2026-03-28
Maintained by: Jarvis AI Assistant