In our daily work and study, we often need to keep up with trending topics across major platforms. Browsing multiple platforms by hand is both time-consuming and prone to missing important information. This article will introduce how to use OpenClaw to deploy the DailyHot trending service, automate the collection of trending topics across the web, and configure scheduled tasks to achieve:
8 AM every day - automatically push trending news from across the web
10 AM every day - fetch AI news and automatically generate blog articles
Project Introduction
What is DailyHot?
DailyHotApi is an API project that aggregates trending data, supporting trending data from 56 platforms, including:
Social media: Weibo, Zhihu, Tieba, V2EX, NGA, Hupu
Video and live streaming: Bilibili, Douyin, Kuaishou, AcFun, Coolapk
News: Baidu, The Paper, 36Kr, Tencent News, NetEase News
Tech communities: ITHome, SSPai, Juejin, CSDN
Games: Genshin Impact, Miyoushe, Honkai, League of Legends
Other: Today in History, weather warnings, earthquake bulletins
What is OpenClaw?
OpenClaw is an AI assistant platform that supports extending functionality through Skills. By configuring scheduled tasks, it enables automated information processing and task execution.
Deployment Process
1. Environment Preparation
First make sure the system has installed:
# Check Docker docker --version
# Check Python python3 --version
# Check pip pip3 --version
2. Configure the Docker Image Source
Due to the domestic network environment, the official Docker source may be inaccessible, so a domestic mirror needs to be configured:
Error response from daemon: failed to resolve reference "docker.io/imsyy/dailyhot-api:latest": dial tcp [2a03:2880:f107:83:face:b00c:0:25de]:443: i/o timeout
Solution: Configure a domestic Docker image source, using the docker.1panel.live or hub.rat.dev mirror.
Problem 2: Python Relative Import Error
Symptom:
ImportError: attempted relative importwithno known parent package
Solution: Create a standalone CLI entry script cli.py, use absolute imports, and load environment variables at runtime:
# Load environment variables first env_file = Path(__file__).parent / '.env' if env_file.exists(): withopen(env_file) as f: for line in f: if line.strip() and'='in line: key, value = line.split('=', 1) os.environ[key] = value
# Then import other modules from api_client import api_client
all_hot = [] for source_id, name in platforms: result = await api_client.fetch_hot_list(source_id) if result and result.get('data'): for item in result.get('data', [])[:3]: all_hot.append({ 'title': item.get('title', ''), 'platform': name, 'hot': item.get('hot', ''), })
# Sort by heat all_hot.sort(key=lambda x: parse_hot_num(x['hot']), reverse=True) return all_hot[:15]
ai_news = [] for source_id, name in ai_platforms: result = await api_client.fetch_hot_list(source_id) for item in result.get('data', []): title = item.get('title', '') ifany(kw in title for kw in ai_keywords): ai_news.append(item)
At 8 AM every day, the Feishu group receives a message like this:
🔥 March4, 2026TrendingNewsTop15
📅 March4, 2026Web-WideTrendsTOP15
1. [Zhihu] Several provinces propose advancing the construction of "good houses, good communities"... [4340000] 2. [Zhihu] The2026NationalTwoSessions — which topics concern you most?... [3920000] 3. [Bilibili] "Honkai: Star Rail"Sparkle character PV... [22211] ...
💡 Data sources: Weibo, Zhihu, Bilibili, 36Kr, Baidu
Auto-Generated Blog Article
At 10 AM every day, a Markdown article is automatically generated in the blog directory:
Through the combination of OpenClaw + DailyHot + Docker, we’ve built a complete automated information workflow:
Information aggregation: one-stop access to trending data from 56 platforms
Smart filtering: automatically filter AI-related news based on keywords
Auto-publishing: generate blog articles with cover images on a schedule
Instant notification: real-time trending pushes via the Feishu bot
This system not only improves the efficiency of information gathering, but also automatically accumulates quality content into the blog, forming a knowledge base. In the future, we could consider integrating more data sources, or using an LLM to intelligently analyze and summarize trending topics.
评论
0 条评论