Skip to content

Commit b2c4bf3

Browse files
TinkTink
authored andcommitted
change newsnow plugin doc
1 parent c03eea6 commit b2c4bf3

File tree

1 file changed

+7
-30
lines changed

1 file changed

+7
-30
lines changed

docs/newsnow_plugin_config.md

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ plugins:
2828
baidu: "百度热搜"
2929
cls-depth: "财联社"
3030
# 可以添加更多新闻源
31-
sina: "新浪新闻"
32-
sohu: "搜狐新闻"
31+
weibo: "微博头条"
32+
douyin: "抖音热搜"
33+
solidot: "奇客Solidot"
3334
```
3435
3536
## 新闻源配置格式
@@ -50,8 +51,9 @@ plugins:
5051
"thepaper": "澎湃新闻",
5152
"baidu": "百度热搜",
5253
"cls-depth": "财联社",
53-
"sina": "新浪新闻",
54-
"sohu": "搜狐新闻"
54+
"weibo": "微博头条",
55+
"douyin": "抖音热搜",
56+
"solidot": "奇客Solidot"
5557
}
5658
```
5759

@@ -79,29 +81,4 @@ plugins:
7981
1. 新闻源的 `source_id` 必须与API接口支持的ID一致
8082
2. 配置更改后需要重启服务或重新加载配置
8183
3. 如果配置的新闻源无效,插件会自动使用默认新闻源
82-
4. JSON格式必须正确,否则会使用默认配置
83-
84-
## 故障排除
85-
86-
### 问题:配置的新闻源不生效
87-
88-
**解决方案**
89-
1. 检查JSON格式是否正确
90-
2. 确认新闻源ID是否有效
91-
3. 查看日志文件中的错误信息
92-
4. 重启服务
93-
94-
### 问题:无法获取新闻
95-
96-
**解决方案**
97-
1. 检查网络连接
98-
2. 确认API接口地址是否正确
99-
3. 查看API接口是否可用
100-
4. 检查日志文件中的错误信息
101-
102-
## 技术实现
103-
104-
- 插件会从 `conn.config["plugins"]["get_news_from_newsnow"]["news_sources"]` 读取配置
105-
- 支持字符串格式的JSON和字典格式的配置
106-
- 配置验证和错误处理机制
107-
- 向后兼容,未配置时使用默认值
84+
4. JSON格式必须正确,否则会使用默认配置

0 commit comments

Comments
 (0)