Add timezone schedule (UTC/沙特/北京)
This commit is contained in:
parent
2623da6b7e
commit
2a555081d9
39
README.md
39
README.md
@ -1,6 +1,15 @@
|
||||
# NewsMinimalist RSS
|
||||
|
||||
从 [newsminimalist.com](https://www.newsminimalist.com) 抓取 Gemini AI 评分的新闻,生成 RSS Feed + HTML 页面。
|
||||
从 [newsminimalist.com](https://www.newsminimalist.com) 抓取 Gemini AI 评分的新闻,生成 RSS Feed + HTML 页面,含 Google 中文翻译。
|
||||
|
||||
## 定时同步(每天 2 次)
|
||||
|
||||
| UTC | 沙特 (UTC+3) | 北京 (UTC+8) | 动作 |
|
||||
|:----|:------------|:------------|:-----|
|
||||
| 02:50 | **05:50** | 10:50 | scraper.py 抓取 + 翻译 → JSON 缓存 |
|
||||
| 05:55 | **05:55** | 10:55 | Hermes 简报(读 RSS → 推微信) |
|
||||
| 14:50 | **17:50** | 22:50 | scraper.py 抓取 + 翻译 → JSON 缓存 |
|
||||
| 17:55 | **17:55** | 22:55 | Hermes 简报(读 RSS → 推微信) |
|
||||
|
||||
## 架构
|
||||
|
||||
@ -9,8 +18,8 @@ browserless (Chrome headless)
|
||||
↓ /content API
|
||||
scraper.py → 解析 <details> → 提取 [score] title (source) link
|
||||
↓ JSON 缓存
|
||||
server.py → RSS 2.0 + HTML
|
||||
↓ NPM 反代
|
||||
server.py → RSS 2.0 + Atom + HTML(中文优先)
|
||||
↓ NPM location 反代
|
||||
https://rsshub.arabiancloud.online/newsminimalist
|
||||
```
|
||||
|
||||
@ -18,23 +27,11 @@ https://rsshub.arabiancloud.online/newsminimalist
|
||||
|
||||
| 文件 | 说明 |
|
||||
|:-----|:-----|
|
||||
| `scraper.py` | 爬虫:browserless 渲染 → BeautifulSoup 解析 → Google 翻译中文 → JSON 缓存 |
|
||||
| `server.py` | 服务:读 JSON 缓存 → 输出 RSS 2.0 + Atom + HTML |
|
||||
| `scraper.py` | 爬虫:browserless 渲染 → BeautifulSoup 解析 → Google Translate 中文 → JSON 缓存 |
|
||||
| `server.py` | 服务:读 JSON 缓存 → 输出 RSS 2.0 + Atom + HTML(中文标题优先,英文副标题) |
|
||||
|
||||
## 部署
|
||||
## 关键依赖
|
||||
|
||||
```bash
|
||||
# 1. 拉取浏览器镜像
|
||||
docker pull browserless/chrome
|
||||
|
||||
# 2. 构建并运行
|
||||
docker build -t newsminimalist-rss .
|
||||
docker run -d --name newsminimalist-rss -p 1202:1202 \
|
||||
--network rsshub_default \
|
||||
-v /root/news_cache.json:/root/news_cache.json \
|
||||
newsminimalist-rss
|
||||
|
||||
# 3. 定时抓取(建议 UTC 02:50, 14:50)
|
||||
crontab -e
|
||||
50 2,14 * * * docker exec newsminimalist-rss python3 /app/scraper.py
|
||||
```
|
||||
- `browserless/chrome` 容器(RSSHub compose 自带)
|
||||
- newsminimalist-rss 容器需连接 `rsshub_default` 网络(访问 `browserless:3000`)
|
||||
- Google Translate 免费接口(无 API key)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user