从 Báo Mới、VnExpress、Tuổi Trẻ、Dân Trí 汇总新闻,通过 Telegram 发送文章链接,适用于每日新闻汇总及 Telegram 新闻机器人搭建。
Tổng hợp tin tức Việt Nam từ 4 nguồn uy tín, gửi qua Telegram Channel với link bài viết. Mỗi tin nhấn vào là ra bài gốc.
text
📊 TỔNG HỢP TIN TỨC v2 — 08:00 22/03/2026
📰 Báo Mới
• Iran nã tên lửa đạn đạo vào căn cứ Mỹ [LINK]
• Lý do Hà Giang, Hội An lọt top điểm đến đẹp [LINK]
• ...
📰 VnExpress
• Tin thị trường chứng khoán hôm nay [LINK]
• ...
📰 Tuổi Trẻ
• ...
📰 Dân Trí
• ...
━━━━━━━━━━━━━━━━━━━━━━
✅ Cập nhật lúc 08:00 22/03/2026
🔗 Nhấn vào tin để đọc bài gốc
text
news_summary_v2.py (cron 8h, 12h, 16h)
├── scrape_baomoi_v2.js → Báo Mới (Playwright, lấy title + URL)
├── RSS: vnexpress.net → VnExpress (lấy title + URL)
├── RSS: tuoitre.vn → Tuổi Trẻ (lấy title + URL)
└── RSS: dantri.com.vn → Dân Trí (lấy title + URL)
↓
Build HTML message với text_link entities
↓
Gửi Telegram → Channel của bạn
FileMục đíchscripts/news_summary_v2.pyScript chính bằng Pythonscripts/news_summary_v2.shWrapper shell (gọi Python)scripts/scrape_baomoi_v2.jsCrawl Báo Mới bằng Playwrightscripts/install.shSetup script — cài đặt nhanhscripts/config.json.exampleFile cấu hình mẫuconfig.jsonCấu hình: bot token, channellogs/Log chạy tự động
bash
# 1. Clone/copy thư mục news-summary
cd ~/workspace/skills/news-summary/scripts
# 2. Tạo config.json
cp ../config.json.example config.json
# Sửa BOT_TOKEN và CHAT_ID trong config.json
# 3. Test
python3 news_summary_v2.py
/newbot → đặt tên → lấy BOT_TOKENTạo Channel Telegram mới
Thêm bot làm Admin (quyền Post Messages)
Gửi tin nhắn vào channel → lấy CHAT_ID: text
https://api.telegram.org/bot<TOKEN>/getUpdates
Tìm chat.id trong response (format: -100xxxxxxxx)
json
// config.json (đặt trong thư mục scripts/)
{
"botToken": "YOUR_BOT_TOKEN_HERE",
"chatId": "YOUR_CHANNEL_ID_HERE"
}
bash
crontab -e
# Thêm dòng (giờ VN = UTC+7):
0 8,12,16 * * * cd /home/YOUR_USER/workspace/skills/news-summary/scripts && python3 news_summary_v2.py >> /home/YOUR_USER/.openclaw/logs/news_summary.log 2>&1
bash
# Python 3 (có sẵn trên hầu hết Linux)
python3 --version
# Playwright (chỉ cần cho Báo Mới)
npm install playwright
npx playwright install chromium
Trong news_summary_v2.py, thêm vào function main():
python
tt_results = fetch_rss('https://thanhnien.vn/rss/home.rss', 5)
sections.append(build_section('Thanh Niên', tt_results))
LỗiCách fixplaywright timeout khi lấy Báo Mớinpx playwright install chromiumBot không gửi vào channelBot cần quyền Admin trong channelCHAT_ID saiFormat đúng: -100xxxxxxxxCron không chạytail ~/.openclaw/logs/news_summary.logKhông tìm thấy config.jsonĐặt trong thư mục scripts/
Tính năngv1v2Báo Mới✅✅VnExpress✅✅Tuổi Trẻ✅✅Dân Trí✅✅Link bài viết❌✅Nhấn đọc bài gốc❌✅Debug log❌✅Chạy độc lập❌✅