mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-28 04:59:52 +01:00
3 KiB
3 KiB
get_news_from_newsnow plugin news source configuration guide
Overview
The get_news_from_newsnow plugin now supports dynamic configuration of news sources through the web management interface, eliminating the need for code modifications. Users can configure different news sources for each agent in the dashboard.
Configuration
1. Configuration via the Web Management Interface (Recommended)
- Log in to the smart console
- Enter the "Role Configuration" page
- Select the agent to configure
- Click the "Edit Function" button
- Find the "newsnow news aggregation" plug-in in the parameter configuration area on the right
- Enter the Chinese name separated by semicolons in the "News Source Configuration" field
2. Configuration file method
Configure in config.yaml:
plugins:
get_news_from_newsnow:
url: "https://newsnow.busiyi.world/api/s?id="
news_sources: "The Paper; Baidu Trending Search; Cailianshe; Weibo; TikTok"
News source configuration format
The news source configuration uses Chinese names separated by semicolons in the following format:
Chinese name 1; Chinese name 2; Chinese name 3
Configuration Example
The Paper; Baidu Trending Search; Cailianshe; Weibo; Douyin; Zhihu; 36Kr
Supported News Sources
The plugin supports the following Chinese names of news sources:
- The Paper
- Baidu Hot Search
- Cailianshe
- Tik Tok
- Zhihu
- 36Kr
- Wall Street Journal
- IT Home
- Toutiao
- Hupu
- Bilibili
- Kuaishou
- Snowball
- Gelonghui
- Fab Finance
- Jinshi Data
- Niuke
- Minority
- Rare Earth Mining
- Phoenix.com
- Bug Tribe
- Lianhe Zaobao
- Cool Security
- Vision Forum
- Reference News
- Satellite News Agency
- Baidu Tieba
- Reliable News
- and more...
Default Configuration
If no news source is configured, the plugin will use the following default configuration:
The Paper; Baidu Trending Search; Cailianshe
Usage Instructions
- Configure news source: Set the Chinese name of the news source in the web interface or configuration file, separated by semicolons
- Call plugin: Users can say "broadcast news" or "get news"
- Specify news source: Users can say "report The Paper" or "get Baidu trending searches"
- Get details: Users can say "Get more details about this news"
How it works
- The plugin accepts Chinese names as parameters (e.g. "The Paper")
- According to the configured news source list, convert the Chinese name to the corresponding English ID (such as "thepaper")
- Use the English ID to call the API to obtain news data
- Return news content to the user
Notes
- The configured Chinese name must be exactly the same as the name defined in CHANNEL_MAP
- After the configuration changes, you need to restart the service or reload the configuration
- If the configured news source is invalid, the plugin will automatically use the default news source
- Use English semicolons (;) to separate multiple news sources. Do not use Chinese semicolons (;).