# What Is TrendRadar by sansan0? A Complete Guide to the Open-Source News Aggregation Tool

> Discover TrendRadar by sansan0, the open-source Python tool that aggregates and analyzes trending news from global platforms. Get personalized reports via notifications or HTML dashboards.

- Repository: [sansan/TrendRadar](https://github.com/sansan0/TrendRadar)
- Tags: getting-started
- Published: 2026-04-22

---

**TrendRadar is an open-source Python tool that aggregates, filters, and analyzes trending news from 11+ Chinese and international platforms, then delivers personalized reports via multiple notification channels or interactive HTML dashboards.**

TrendRadar by sansan0 transforms raw hot-search data from platforms like Zhihu, Bilibili, Weibo, and the Wall Street Journal into concise, actionable intelligence. Whether you need daily digests, real-time alerts, or AI-curated content streams, this modular tool automates the entire pipeline from crawling to delivery.

## Core Capabilities of TrendRadar

### Multi-Platform News Aggregation

TrendRadar ships with **built-in crawlers for 11+ platforms** and a plugin-style API for adding custom sources. The crawler layer in [`trendradar/crawler/fetcher.py`](https://github.com/sansan0/TrendRadar/blob/main/trendradar/crawler/fetcher.py) handles HTTP requests with configurable proxy support and request throttling via `REQUEST_INTERVAL`.

```python

# From trendradar/__main__.py — pipeline orchestration

analyzer = NewsAnalyzer(config=ctx.config)
analyzer.run()  # Triggers: crawl → analyze → generate HTML → notify

```

### RSS and Atom Feed Support

The [`trendradar/crawler/rss.py`](https://github.com/sansan0/TrendRadar/blob/main/trendradar/crawler/rss.py) module provides optional RSS/Atom ingestion that shares the same keyword-based filtering logic as hot-search crawlers. Each feed supports `max_age_days` for freshness filtering and `max_items` for volume control.

```python

# Example RSS feed configuration structure

new_feed = {
    "id": "myblog",
    "name": "My Blog",
    "url": "https://example.com/rss",
    "max_items": 30,
    "enabled": True,
    "max_age_days": 7
}

```

### Dual Filtering Modes: Keyword and AI-Driven

TrendRadar offers **two complementary filtering approaches** controlled via [`config/config.yaml`](https://github.com/sansan0/TrendRadar/blob/main/config/config.yaml):

| Method | Implementation | Use Case |
|--------|---------------|----------|
| **Keyword matching** | [`frequency_words.txt`](https://github.com/sansan0/TrendRadar/blob/main/frequency_words.txt) groups with required/normal words | Fast, deterministic filtering by topic |
| **AI classification** | [`trendradar/ai/filter.py`](https://github.com/sansan0/TrendRadar/blob/main/trendradar/ai/filter.py) (`AIFilter`) with LLM APIs | Natural-language interest descriptions, semantic understanding |

The keyword engine in [`trendradar/core/analyzer.py`](https://github.com/sansan0/TrendRadar/blob/main/trendradar/core/analyzer.py) computes **news weights** using rank, frequency, and hotness contributions via `calculate_news_weight()`.

```python

# Switch to AI-only filtering in config/config.yaml

FILTER:
  METHOD: ai
AI_FILTER:
  ENABLED: true
  INTERESTS_FILE: my_interests.txt
  MIN_SCORE: 0.6
  BATCH_SIZE: 200

```

### Three Push Modes for Different Schedules

The [`trendradar/core/scheduler.py`](https://github.com/sansan0/TrendRadar/blob/main/trendradar/core/scheduler.py) module implements **three execution modes** controlled by [`config/timeline.yaml`](https://github.com/sansan0/TrendRadar/blob/main/config/timeline.yaml):

- **`daily`**: Full-day summary with complete statistics
- **`current`**: Latest snapshot of hot searches
- **`incremental`**: Only newly-appearing items since last run

The scheduler guarantees **once-per-period execution** via storage-backed tracking in `ResolvedSchedule`.

### Rich Notification Channel Support

TrendRadar's [`trendradar/notification/dispatcher.py`](https://github.com/sansan0/TrendRadar/blob/main/trendradar/notification/dispatcher.py) builds channel-specific payloads and handles **batch splitting** for oversized messages. Supported channels include:

- Enterprise WeChat, personal WeChat
- Telegram, Feishu, DingTalk
- Slack, ntfy, Bark
- Email, generic webhooks

The optional **AI translator** (`AITranslator`) can translate hot-list content when `AI_TRANSLATION.ENABLED` is true.

### Interactive HTML Reports and Visual Editor

TrendRadar generates a **self-contained [`index.html`](https://github.com/sansan0/TrendRadar/blob/main/index.html)** suitable for GitHub Pages hosting. The report includes:

- Visual configuration editor accessible via **"配置编辑器"** button
- Direct loading and editing of [`config/config.yaml`](https://github.com/sansan0/TrendRadar/blob/main/config/config.yaml) and [`config/timeline.yaml`](https://github.com/sansan0/TrendRadar/blob/main/config/timeline.yaml)
- Real-time preview of platform lists, keyword groups, and schedule templates

## Deployment Options for TrendRadar

### Docker Container Deployment

The official image `wantcat/trendradar` supports environment-variable configuration:

```bash
docker run -d \
  -e TIMEZONE=Asia/Shanghai \
  -e USE_PROXY=true \
  -v $(pwd)/config:/app/config \
  -v $(pwd)/output:/app/output \
  wantcat/trendradar

```

### GitHub Actions CI/CD

TrendRadar includes ready-to-use workflows for automated execution without local infrastructure.

### Command-Line Options

```bash

# Standard full pipeline

python -m trendradar

# Skip crawling, use existing data

python -m trendradar --no-crawl

# Install dependencies

pip install -r requirements.txt

```

## Summary

TrendRadar by sansan0 is a **production-ready, extensible news aggregation system** with these key strengths:

- **Modular architecture**: Clean separation between crawling, analysis, AI, scheduling, and notification layers
- **Dual filtering**: Keyword precision plus AI semantic understanding
- **Flexible deployment**: Docker, GitHub Actions, or direct Python execution
- **Rich output**: Interactive HTML, multi-channel notifications, and visual configuration
- **Extensible design**: Plugin API for new platforms and notification channels

The codebase in `sansan0/TrendRadar` demonstrates best practices for maintainable Python automation tools, with centralized context management via `AppContext` and storage-agnostic data persistence.

## Frequently Asked Questions

### What platforms does TrendRadar support out of the box?

TrendRadar includes built-in crawlers for **11+ platforms** including Zhihu, Bilibili, Weibo, 36Kr, Juejin, Wall Street Journal, and others. The `PLATFORMS` configuration in [`config/config.yaml`](https://github.com/sansan0/TrendRadar/blob/main/config/config.yaml) controls which sources are active, and the plugin-style API in [`trendradar/crawler/fetcher.py`](https://github.com/sansan0/TrendRadar/blob/main/trendradar/crawler/fetcher.py) enables adding custom platforms.

### How does the AI filtering work in TrendRadar?

The **AI filter** in [`trendradar/ai/filter.py`](https://github.com/sansan0/TrendRadar/blob/main/trendradar/ai/filter.py) (`AIFilter` class) classifies news items against natural-language interest descriptions stored in [`ai_interests.txt`](https://github.com/sansan0/TrendRadar/blob/main/ai_interests.txt). It uses LLM APIs (OpenAI, Gemini, DeepSeek) with configurable `MIN_SCORE` thresholds and `BATCH_SIZE` for efficient processing. The system caches results and detects interest file changes via hashing to avoid redundant API calls.

### Can TrendRadar run without crawling new data?

Yes. TrendRadar supports a **`--no-crawl` flag** (handled in [`trendradar/__main__.py`](https://github.com/sansan0/TrendRadar/blob/main/trendradar/__main__.py)) that skips the `DataFetcher` entirely. This mode loads existing data from SQLite storage, regenerates the HTML report, and sends notifications—useful for scheduled re-reports or when data is collected by external systems.