Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

About Config

关于配置

The server reads config.toml from the same directory as the executable. If the file does not exist, it will be auto-created with default content.

服务器从可执行文件同目录读取 config.toml。如果文件不存在,会在首次启动时自动创建默认配置。

Format / 格式

[server]
port = 7878
max_concurrent = 8
timeout = 60
status_route = false

[routes]
disabled = []
rate_limit = { "/scientificamerican_news" = 5, "/defenseone_news" = 1 }

[cookie]
origins = ["https://bilibili.com"]

Fields / 字段说明

Field / 字段Type / 类型Default / 默认值Description / 描述
server.portint7878服务器监听端口。Port the server listens on.
server.max_concurrentint自动检测的 CPU 核心数并发上限基数,实际许可数为该值 × 2。Base value of the concurrency limit; the actual number of permits is this value × 2.
server.timeoutint60上游请求超时(秒)。Timeout for upstream requests, in seconds.
server.status_routeboolfalse是否开放 /status 状态页(服务运行信息 JSON)。默认关闭;true 时访问 /status 返回 {"status":"ok",...}。Whether to enable the /status page (runtime info JSON). Disabled by default; when true, /status returns {"status":"ok",...}.
routes.disabledstring[][]需要禁用的路由列表,带前导斜杠(如 "/zhihu_hot"),漏掉斜杠不生效。List of routes to disable, with the leading slash (e.g. "/zhihu_hot"); entries without it have no effect.
routes.rate_limittable{}路由名到缓存间隔(秒)的映射。配置后该路由的上游响应会被缓存;间隔内的重复请求直接复用缓存、不再请求上游;若解析报错则自动清理缓存。Map of route name to cache interval (seconds); caches upstream responses and avoids re-fetching within the interval, auto-cleared on parse errors.
cookie.originsstring[]["https://bilibili.com"]rssust cookie <browser> 导出 cookies 的网址列表。List of URLs whose cookies are exported by rssust cookie <browser>.

Examples / 示例

禁用 zhihu_hot 和 bilibili_weekly 两个路由,并手动指定并发上限与超时:

[server]
port = 8080
max_concurrent = 4
timeout = 30

[routes]
disabled = ["/zhihu_hot", "/bilibili_weekly"]

不指定 max_concurrent 时,程序自动使用检测到的 CPU 核心数;不指定 timeout 时默认 60 秒;不指定 port 时默认 7878:

[routes]
disabled = []

Logging / 日志

The program uses tracing as the logging backend. Our own code uses tracing macros directly (tracing::warn!, tracing::error!, etc.). The tracing-log bridge forwards log crate records from third-party dependencies (reqwest, hyper, etc.) into the same tracing subscriber.

程序使用 tracing 作为日志后端。项目自身代码直接使用 tracing 宏 (tracing::warn!、tracing::error! 等);第三方依赖(reqwest、hyper 等)仍使用 log crate,通过 tracing-log 桥接统一转发到同一个 tracing 订阅器输出。

Log level is controlled by the RUST_LOG environment variable, default is info. You can also set a per-target level, e.g. RUST_LOG=info,rssust=debug.

日志级别通过环境变量 RUST_LOG 控制,默认级别为 info。 也可以单独指定某个模块的级别,如 RUST_LOG=info,rssust=debug。

# 默认 info 级别
./rssust

# 显示 debug 级别日志
RUST_LOG=debug ./rssust

# 只显示 warn 及以上的日志
RUST_LOG=warn ./rssust

# 本项目模块用 debug,第三方库保持 info
RUST_LOG=info,rssust=debug ./rssust

cookies 配置指南

因为有些路由需要cookies,而cookies又不好分发,故作此教程以告诉导出哪个网站的cookies,又或者是否需要登录或者额外配置,cookies 示例格式:
Because some routes require cookies, and cookies are hard to distribute, this tutorial was made to show how to export cookies from a website, or whether login or additional setup is needed. Example cookie format:
{
“name”: “session_id”,
“value”: “abc123”,
“domain”: “.example.com”,
“path”: “/”,
“secure”: true,
“httpOnly”: true,
“sameSite”: “Lax”,
“expirationDate”: 1893456000
}

You can use the browser plugin Cookie-Editor to export it, or use the built-in CLI command:

rssust cookie <browser>

Supported browsers: firefox, chrome (chromium/chromebeta 也映射到 chrome)(macOS: safari,Windows: edge)

Example:

./env/rssust cookie chrome

导出哪些网址由 config.toml 的 [cookie] origins = ["https://bilibili.com"] 控制,可自行增删。 已存在于 cookies.json 中的域名也会一并刷新。 The URLs to export are controlled by [cookie] origins = ["https://bilibili.com"] in config.toml; existing domains in cookies.json are also refreshed.

Tips: Linux 下 firefox 可能因为上游 crate 的问题需要链接文件夹修复

Bilibili

bilibili.com
无需登录,访客 cookies 即可
注意:bilibili_video_reply 需要登录后的 cookies(需包含 SESSDATA)

给用户使用的函数——简便

位置

src/easyuser.rs

概述

封装了一系列辅助函数,供路由开发者(router)方便地调用。所有函数通过 use crate::easyuser::*; 导入。


爬虫类

异步:项目已迁移到 tokio 异步运行时,以下 fetch 函数均为 async fn,调用时必须加 .await,例如 fetch_reqwest_get(&url).await?。所有 fetch 函数共享一个全局 reqwest::Client(OnceLock 懒加载),复用连接池,不会每次新建。

缓存:对在 config.toml 的 routes.rate_limit 中配置了间隔的路由,GET/POST 各变体会自动走 rate_limit 模块缓存——间隔内重复请求直接复用缓存、不再请求上游;解析报错时自动清理缓存。

浏览器指纹:另有 fetch_browser_get* 系列(基于 curl-impersonate-cli)用于绕过 Cloudflare 等按 TLS 指纹反爬的站点,见下文。

fetch_reqwest_get()

签名: pub async fn fetch_reqwest_get(url: &str) -> Result<String, Error>

使用 reqwest 库发送 HTTP GET 请求,返回响应文本。不携带 Cookie,不执行 JavaScript。

fetch_reqwest_get_with_headers()

签名: pub async fn fetch_reqwest_get_with_headers(url: &str, headers: &[(&str, &str)]) -> Result<String, Error>

使用 reqwest 库发送带自定义 Header 的 HTTP GET 请求。

示例:

#![allow(unused)]
fn main() {
let headers = &[("Referer", "https://example.com"), ("Cookie", "session=abc")];
fetch_reqwest_get_with_headers("https://api.example.com/data", headers).await?;
}

fetch_reqwest_post()

签名: pub async fn fetch_reqwest_post(url: &str, body: String, header: Option<reqwest::header::HeaderMap>) -> Result<String, Error>

使用 reqwest 库发送 HTTP POST 请求,返回响应文本。第三个参数 header 用于自定义请求头,不需要时传 None。

fetch_reqwest_post_json()

签名: pub async fn fetch_reqwest_post_json(url: &str, json_body: &str) -> Result<String, Error>

使用 reqwest 库发送 Content-Type 为 application/json 的 HTTP POST 请求。

fetch_reqwest_post_json_with_headers()

签名: pub async fn fetch_reqwest_post_json_with_headers(url: &str, json_body: &str, headers: &[(&str, &str)]) -> Result<String, Error>

发送 Content-Type 为 application/json 的 POST 请求,并携带自定义 Headers。

签名: pub fn client_with_cookie() -> Result<reqwest::Client, Error>

构建一个启用了 cookie_store(true) 的 reqwest::Client 实例(独立于全局共享 Client),用于需要带 Cookie 维持会话的场景。

fetch_browser_get()

签名: pub async fn fetch_browser_get(url: &str) -> Result<String, Error>

带浏览器 TLS 指纹伪装的 GET 请求(绕过 Cloudflare 等反爬),默认使用 chrome124 profile。

fetch_browser_get_with_profile()

签名: pub async fn fetch_browser_get_with_profile(url: &str, profile: &str) -> Result<String, Error>

同上,但可指定 curl-impersonate 的 profile(如 chrome110 / edge99,某些站点仅对特定旧指纹放行)。

fetch_browser_get_with_headers()

签名: pub async fn fetch_browser_get_with_headers(url: &str, headers: &[(&str, &str)]) -> Result<String, Error>

带浏览器指纹伪装,并携带自定义 Headers 的 GET 请求(默认 chrome124)。

fetch_browser_get_with_headers_profile()

签名: pub async fn fetch_browser_get_with_headers_profile(url: &str, headers: &[(&str, &str)], profile: &str) -> Result<String, Error>

带浏览器指纹伪装 + 自定义 Headers + 指定 profile 的 GET 请求。

注意:fetch_browser_get* 依赖 curl-impersonate-cli(已启用其 download feature),首次调用会自动下载预编译的 curl-impersonate 二进制,之后复用。

HttpError

签名: pub struct HttpError { pub status: u16, pub message: String }

自定义错误类型,可携带 HTTP 状态码。路由中可用 HttpError::bad_request(msg)、HttpError::not_found(msg)、HttpError::bad_gateway(msg) 构造。渲染层会优先使用 HttpError 的 status 作为响应状态码、message 作为正文(否则默认 500)。


序列化类

req_param()

签名: pub fn req_param(params: &HashMap<String, String>, key: &str, desc: &str) -> Result<String, Error>

取必填参数:存在且非空时返回其值,否则返回错误 Params should contain key (desc)。

req_optional()

签名: pub fn req_optional(params: &HashMap<String, String>, key: &str) -> Option<String>

取可选参数,缺失返回 None。

req_usize()

签名: pub fn req_usize(params: &HashMap<String, String>, key: &str, desc: &str) -> Result<usize, Error>

取必填参数并要求解析为 usize,失败返回错误说明。

opt_usize()

签名: pub fn opt_usize(params: &HashMap<String, String>, key: &str, default: usize) -> usize

取可选整数参数,缺失或解析失败返回 default。

params_to_hashmap()

签名: pub fn params_to_hashmap(query: &str) -> HashMap<String, String>

将 key1=value1&key2=value2 格式参数字符串解析为 HashMap。

用在: connect::handle_connection() 中解析 URL 查询参数。

hashmap_to_params()

签名: pub fn hashmap_to_params(hashmap: HashMap<String, String>) -> String

将 HashMap 序列化为 key1=value1&key2=value2 格式字符串。


时间类

now()

签名: pub fn now() -> String

返回当前时间的 RSS 标准格式:Sat, 11 Jul 2026 12:00:00 +0800

用在: 路由中设置 RSS Item 的 pub_date 字段。

chinese_date_to_parse()

签名: pub fn chinese_date_to_parse(input: &str) -> Option<String>

将中文日期格式 x月y日 解析为 RSS 标准时间格式。年份取当前年份。

示例:"7月11日" → "Sat, 11 Jul 2026 00:00:00 +0800"

timestamp_to_rss()

签名: pub fn timestamp_to_rss(ts: i64) -> String

将 Unix 时间戳(i64)转换为 RSS 标准时间格式。

datetime_str_to_rss()

签名: pub fn datetime_str_to_rss(datetime_str: &str) -> Option<String>

将 "YYYY-MM-DD HH:MM:SS" 格式的字符串转换为 RSS 标准时间格式。输入视为东八区本地时间(不做偏移,直接附加 +0800)。

示例:"2026-07-11 12:00:00" → "Sat, 11 Jul 2026 12:00:00 +0800"

注意:若来源时间是 UTC,请改用 utc_str_to_rss。

utc_str_to_rss()

签名: pub fn utc_str_to_rss(datetime_str: &str) -> Option<String>

将 "YYYY-MM-DD HH:MM:SS" 格式的字符串转换为 RSS 标准时间格式。输入视为 UTC 时间,自动换算为东八区(+0800)后再输出。

示例:"2026-07-11 12:00:00" → "Sat, 11 Jul 2026 20:00:00 +0800"

适用于带 Z 后缀的 ISO 时间(如 datePublished),调用前先 s.replace('T', " ").replace('Z', "") 归一化,参见 apnews_topics 的用法。

rfc3339_to_rss()

签名: pub fn rfc3339_to_rss(s: &str) -> String

将 RFC 3339 格式字符串(如 2026-07-11T12:00:00+08:00)转换为 RSS 标准时间格式。

rfc3339_to_rss_utc()

签名: pub fn rfc3339_to_rss_utc(s: &str) -> String

同上,但输入视为 UTC 时间,输出换算为东八区(+0800)。

rfc2822_to_rss()

签名: pub fn rfc2822_to_rss(s: &str) -> String

将 RFC 2822 格式(如 Sat, 11 Jul 2026 12:00:00 +0800)转换为 RSS 标准时间格式。

date_str_to_rss()

签名: pub fn date_str_to_rss(date_str: &str, fmt: &str, offset: &str) -> Option<String>

按自定义 fmt 解析日期字符串,并按 offset(如 +0800)校正时区后输出 RSS 标准时间格式。


字符类

no_double_quotes()

签名: pub fn no_double_quotes(s: String) -> String

去除字符串首尾的双引号。

用在: 路由中清理从 JSON 提取的字符串值,因为 serde_json::Value::to_string() 会给字符串加双引号。

签名: pub fn env_search(s: &str) -> Option<String>

查找环境变量值,找到返回 Some(val),找不到返回 None。


工具类

parse_bool()

签名: pub fn parse_bool(value: Option<&String>, default: bool) -> bool

将字符串值解析为布尔值。支持 "1" / "true" / "True" → true,"0" / "false" / "False" → false,其他值尝试 parse(),None 返回 default。

签名: pub fn load_cookie_header(domain_filter: Option<&str>) -> Result<Option<String>>

从二进制同目录的 cookies.json 加载 Cookie,返回 name=value; name=value... 格式的字符串。可传入 domain_filter 只返回指定域名的 Cookie(如 Some("bilibili.com"))。

resolve_url()

签名: pub fn resolve_url(href: &str, base: &str) -> String

将相对链接解析为绝对 URL(base 为页面地址)。支持 // 协议相对、/ 根相对、../ 等形式的解析。

truncate()

签名: pub fn truncate(s: &str, n: usize) -> String

将字符串截断到最多 n 个字符(按 char 计数,避免截断多字节 UTF-8),超出部分以单个省略号 … 结尾。


开发者提示

  • 路由中必须导入 use crate::easyuser::*;
  • 从 JSON 提取字符串后记得用 no_double_quotes() 清理
  • 需要携带 Cookie 时,用 fetch_reqwest_get_with_headers() 配合 load_cookie_header()
  • 所有 fetch 调用都要加 .await(async fn),且不要在持有 scraper 的 Html/Selector/ElementRef 时跨 .await(它们不是 Send),详见 new_router_cn.md 的同步转异步章节

环境变量配置指南

因为有些路由需要配置环境变量才能正常工作,例如 GitHub 加强了反爬,github_* 路由不带令牌时 API 不可访问,故作此说明以告知哪些路由需要哪个环境变量,以及如何设置。
Because some routes need environment variables to work properly — for example, GitHub has strengthened anti-crawling, so the github_* routes cannot reach the API without a token — this page explains which routes need which environment variables and how to set them.

设置环境变量(Linux/macOS 临时生效):

export GITHUB_TOKEN=ghp_xxx

永久生效可写入 ~/.bashrc 或 ~/.zshrc。

设置环境变量(Windows):

setx GITHUB_TOKEN ghp_xxx

PowerShell 临时生效:

$env:GITHUB_TOKEN = "ghp_xxx"

环境变量由启动服务器的进程读取,设置后需先使其生效,再启动服务。
The variables are read by the process that starts the server; set them first, then start the service.

GITHUB_TOKEN

GitHub 访问令牌(Personal Access Token),供 github_* 系列路由调用 GitHub API 使用。

  • 令牌在 GitHub → Settings → Developer settings → Personal access tokens 生成(classic 或 fine-grained),只显示一次,请保存。
  • 多数 github_* 路由只读公开数据,classic 令牌无需额外权限;访问私有仓库或 GraphQL 接口需按需授权(如 repo、read:user)。
  • 未配置时对应路由返回 500,并提示 Environment variable GITHUB_TOKEN is required。

English HERE

在线文档

What is Rssust?

Rssust是一个使用Rust语言做的信息聚合转换软件,希望让每个人在桌面电脑上使用网站转RSS这项技术,类似于Rsshub,但目前还在开发,

我们希望得到你的帮助

厌倦了庞大的内存占用,缓慢的运行速度与自建门槛极高以及依赖于别人建的Rsshub服务器但是有一天居然停服了,或者你干脆就是个Rust迷?

虽然现在Rssust的路由和RSShub的路由在数量上不是一个量级,但是这样提供了一个先例,也许借助AI技术,可以使Rssust的路由数量得到增长,但这可能有点抄袭的嫌疑,所以还是要求AI自己生成好了。所以如果这侵犯了你的权利,请邮件并且找所有可能的方式联系我,我会尽快处理。

如果你想自己做一个路由可以点这里:路由制作指南——中文 不想写 Rust 的话,可以用 rhai 脚本写路由:脚本路由说明 这里是目前服务器支持的ROUTERS,你的左侧Router一栏都是,但这里有一些分类ROUTERS

对于一般用户使用:

安装:

值得一提的是,运行时,二进制的目录结构如下所示:

├── cookies.json
├── docs_md
│   ├── .......md
│   └── official
│       └── ......md
├── index
│   ├── 404.html
│   └── index.html
├── scripts            # 可选,需要编译时开启 scripts feature
│   └── .......rhai
└── rssust

比较严苛

二进制:

运行二进制十分简单:在release下载,解压,然后启动env文件夹下的二进制文件即可

从源码构建:

Linux用户:

git clone https://github.com/huiinyg-rusting/Rssust
cd Rssust
./build.sh

想用 rhai 脚本写路由(不写 Rust),编译时额外加 --features scripts:

cargo build --release --features scripts

脚本放进 exe 同目录的 scripts/,文件名即路由名,写法见脚本路由说明。

然后没有版本更新的时候,你可以输入如下命令来更新html文档以及从firefox抓取cookies(注意这会抓取所有cookies,注意保护隐私):

cd Rssust
./env/rssust cookie firefox
./env/rssust docs
./env/rssust

来启动 Windows用户:CMD(未经验证)

git clone https://github.com/huiinyg-rusting/Rssust
cd Rssust
cargo build --features scripts
robocopy .\target\debug .\env rssust /IF /S
.\env\rssust.exe cookie firefox
.\env\rssust.exe docs
.\env\rssust.exe

中文

Online Docs

What is Rssust?

Rssust is an information aggregation and conversion software built with Rust, aiming to enable everyone to use website-to-RSS technology on desktop computers, similar to Rsshub, but currently still in development.

We Hope for Your Help

Tired of massive memory consumption, slow running speed, and the extremely high barrier to self-hosting, or dependent on someone else’s Rsshub server that suddenly shuts down one day, or are you simply a Rust enthusiast?

Although Rssust’s routers are not on the same scale as Rsshub’s in terms of quantity, it provides a precedent. Perhaps with AI technology, Rssust’s router count can grow, but this may seem somewhat like plagiarism, so it’s better to let AI generate its own. Therefore, if this infringes on your rights, please email me and contact me through all possible means, and I will handle it as soon as possible.

If you want to create your own router, click here: Router Development Guide — English Prefer scripting over Rust? Write the route in rhai: Script Route Guide Here are the ROUTERS currently supported by the server. All the routers in your left Router column are listed, but there are some categorized here ROUTERS

For General Users:

Installation:

It’s worth noting that when running, the binary directory structure should be as follows:

├── cookies.json
├── docs_md
│   ├── .......md
│   └── official
│       └── ......md
├── index
│   ├── 404.html
│   └── index.html
├── scripts            # optional, requires the scripts feature at compile time
│   └── .......rhai
└── rssust

It’s quite strict.

Binary:

Running the binary is very simple: download it from the release page, extract it, and then start the binary file in the env folder.

Building from Source:

Linux users:

git clone https://github.com/huiinyg-rusting/Rssust
cd Rssust
./build.sh

To enable rhai script routes (no Rust needed), add the feature at compile time:

cargo build --release --features scripts

Drop .rhai files into scripts/ next to the executable; the filename is the route name. See the Script Route Guide for the syntax.

Then when there’s no version update, you can run the commands below to refresh the HTML docs and grab cookies from Firefox (note that this grabs ALL cookies — mind your privacy):

cd Rssust
./env/rssust cookie firefox
./env/rssust docs
./env/rssust

to start it.

Windows users: CMD (unverified)

git clone https://github.com/huiinyg-rusting/Rssust
cd Rssust
cargo build --features scripts
robocopy .\target\debug .\env rssust /IF /S
.\env\rssust.exe cookie firefox
.\env\rssust.exe docs
.\env\rssust.exe

English HERE

路由制作指南

本文可以给人看,也可以给AI看 在开发前,你需要:

  • 一个标准的cargo环境
  • git 版本管理系统
  • 编辑器
  • 基础rust的知识,最好是通过官方书籍,以及有一些std库里频率很高的方法也要学会,比如给可恢复错误做处理的几种方法之类的;
  • RSS的知识 可以通过:官方RSS 2.0.11 英文 或者 博客园-小y 翻译的RSS 2.0.10 中文进行学习
  • RSS Crates 的知识,懂得如何构建一个RSS 官方英文文档 尤其是ChannelBuilder和ImageBuilder
  • 因为不同上游API,你需要学会不同的方法,比如说你的上游API是json格式,你其实实际大概率只需要学会serde_json Crates的.pointer()和.get()这两种方法,而如果你需要直接处理html和DOM,你需要scraper的文档中推荐的方法,以及避免导致panic!!!

你可以在/src/router下新建一个你自己的.rs文件,但有一些要求:

  1. 文件名只能包含小写字母或数字或下划线还有固定的.rs后缀,严禁在任何文件名或者网址路径中出现空格!
  2. 路由的规范命名是这样的: 平台小写英文名_功能小写英文名
  3. 文件名的除了后缀名的部分就是你的路由名;
  4. 每一个路由在/docs下都必须有一个对应为 路由名.md的文档,待会再讲;
  5. 每一个路由只能对应一种功能;

开发前,最好先编译一次,增量编译在开发模式已经开启,第一次编译会耗时十分钟以内,要下很多的Crates,之后都是十秒钟编译完的事 提供了build_dev.sh以及build.bat脚本

导入库

#![allow(unused)]
fn main() {
use std::collections::HashMap;
use crate::easyuser::*;
use anyhow::*;
use rss::*;
}

上面这几个库必须导入,下面的而看需要导入

#![allow(unused)]
fn main() {
use serde_json::Value;//json用的
use scraper::*;//html用的
}

每个路由的主函数规范长这样:

#![allow(unused)]
fn main() {
pub async fn get(para: HashMap<String,String>) -> Result<String, Error> {
}
}

函数的调入和返回结果类型不能改的!(如果你没有用到 para,变量,你可以直接把他写成 _para ,这样编译器就不会警告)其中,para的作用是传入用户访问时的通过http get协议传入的参数,以及序列化成HashMap格式了。

注意签名里的 async:因为 fetch_reqwest_get 等抓取函数都是异步的,get 自己也必须是 async 才能 await 它们。

异步常见错误(写路由时最常踩的坑)

下面是新路由在 cargo build 时最常报的编译错误,按报错信息列出。遇到哪条照着改哪条。

1. await is only allowed inside async functions and blocks(E0728)

你在这个函数里写了 .await,但这个函数本身不是 async。最常见于:把抓详情页的逻辑拆成了一个普通辅助函数:

// 错误:helper 不是 async,却想 await
fn fetch_detail(url: &str) -> Result<String, Error> {
    fetch_reqwest_get(url).await?   // 编译报错 E0728
}

改成 async fn,并且调用处也要 .await:

async fn fetch_detail(url: &str) -> Result<String, Error> {
    fetch_reqwest_get(url).await?
}
let detail = fetch_detail(&url).await?;

2. Result<String, Error> is not a future(E0277)

忘了加 .await。fetch_reqwest_get(url) 返回的不是 String,而是一个“将来才拿到结果的 Future“;只有 .await 才能把它变成 String:

#![allow(unused)]
fn main() {
// 错误:拿到的是 Future,不是 String
let html = fetch_reqwest_get(&url)?;
// 正确:加 .await 才得到 String
let html = fetch_reqwest_get(&url).await?;
}

检查你文件里所有 fetch_reqwest_get / fetch_reqwest_post / fetch_reqwest_get_with_headers 调用,是否都跟了 .await。

3. future cannot be sent between threads safely(E0277,scraper 专属)

只有用了 scraper 解析 HTML 才会碰到。Html、Selector、ElementRef 这些类型不是 Send,不能带过 .await。典型场景:先解析出列表 doc,然后在循环里抓详情页:

#![allow(unused)]
fn main() {
// 错误:doc(Html 类型)活着穿过 .await,编译报 not Send
let doc = Html::parse_document(&html);
for link in &links {
    let detail_html = fetch_reqwest_get(link).await?;   // 报错:doc 在 await 那边还活着
}
}

修法是**“先解析、后抓取“两段式**:第一步先把列表页解析完,把需要的字段全存成 String/Vec<String>(在 { } 块里用 doc,块结束就自动释放);第二步才循环去抓详情页,此时手里只有纯数据:

#![allow(unused)]
fn main() {
// 第一步:解析列表,只收集 String。doc 在块结束就 drop 了
let items: Vec<(String, String)> = {
    let doc = Html::parse_document(&html);
    let sel = Selector::parse("a.title").unwrap();
    doc.select(&sel).map(|e| {
        let title = e.text().collect::<String>().trim().to_string();
        let href = e.value().attr("href").unwrap_or("").to_string();
        (title, href)
    }).collect()
};
// 第二步:此时没有 scraper 类型了,随便 await
for (title, href) in &items {
    let detail_html = fetch_reqwest_get(href).await?;
}
}

4. 详情页也要用 scraper?同样先解析完再放下

如果你抓完详情页还要再解析它、甚至再抓下一页,记住同一个原则:detail_doc 用完立刻丢弃。惯用写法是把详情解析放进 if let Ok(...) = fetch(...).await { ... } 块里,块内完成解析、块结束自动释放,块外不再引用它。

小结:凡是要 await,身边就不要有 Html/Selector/ElementRef。看到 not Send 就回想这一条。

参考实现:chinanews、stcn_article_list、bjnews_cat、eastday_24、solidot、guancha_headline、guanhai、ithome_ranking、jianshu_home 这些路由就是按上面的模式写的。

一个完整的最小路由(JSON 接口版)

下面是一个可以照抄的完整例子。它抓一个 JSON 接口,转成 RSS,保存为 src/router/my_test.rs 就能编译:

#![allow(unused)]
fn main() {
use crate::easyuser::*;          // 抓取函数、时间处理等都在这
use anyhow::{Error, Result};
use rss::*;                       // RSS 生成
use serde_json::Value;            // 解析 JSON 用
use std::collections::HashMap;

pub async fn get(para: HashMap<String,String>) -> Result<String, Error> {
    // 1. 取用户参数(可选,默认给一个)
    let id = para.get("id").cloned().unwrap_or_default();

    // 2. 抓上游。注意:fetch 是异步的,调用后要加 .await
    let html = fetch_reqwest_get(&format!("https://api.example.com/list?id={}", id)).await?;

    // 3. 解析 JSON
    let json: Value = serde_json::from_str(&html)?;
    let list = json["data"]["list"].as_array().ok_or_else(|| anyhow!("没有 list 字段"))?;

    // 4. 一条条转成 RSS Item
    let mut item_vec = Vec::new();
    for item in list {
        let rss_item = ItemBuilder::default()
            .title(Some(item["title"].as_str().unwrap_or("").to_string()))
            .link(Some(item["url"].as_str().unwrap_or("").to_string()))
            .description(item["desc"].as_str().unwrap_or(""))
            .pub_date(now())           // 不会解析时间就先填当前时间
            .build();
        item_vec.push(rss_item);
    }

    // 5. 组装成频道输出
    let channel = ChannelBuilder::default()
        .title("我的测试频道")
        .link("https://api.example.com")
        .description("示例")
        .items(item_vec)
        .build();
    Ok(channel.to_string())
}
}

写好后按下面「注册」两步操作,cargo build 一下,跑起来访问 /my_test 就能看到你的 RSS 了。如果上游是 HTML 而非 JSON,把第 3 步换成 scraper 解析(注意上面第 3、4 条错误)。

项目封装了一些方便用户的函数,可以在src/easyuser.rs查看,或者在easyuser_cn.html查看 具体的程序逻辑就由你自己编写吧。

写完怎么注册呢?

在 /src/router/mod.rs 中,在最后新建一行,写上 pub mod 你的路由名; 然后再在 src/request_rules.rs 的 routes! { ... } 块中(按字母序)仿照其他条目添加一行:

#![allow(unused)]
fn main() {
("/你的路由名", 你的路由名),
}

routes! 宏会根据这些条目自动生成:

  • pub const ROUTES: &[&str](路由路径数组)与 ROUTE_COUNT(路由总数)
  • pub async fn route_dispatch()——内部用 match url 把路径分发到对应的 你的路由名::get(...) 函数

所以不要手写 match url 分支,也不要改动宏里的写法。注册完运行 ./env/rssust docs 会自动把新路由写进 SUMMARY.md 导航和 official/routes.md 路由清单。

注册完怎么运行呢?

我对二进制文件设置的一些必要环境目录十分严苛,cookies.json,index文件夹等,都必须在二进制文件同目录下,因此我创建了一个env文件夹,需要的环境都在里面。他应该是长这样的

├── cookies.json
├── docs_md
│   ├── .......md
│   └── official
│       └── ......md
├── index
│   ├── 404.html
│   └── index.html
└── rssust

我还写了一个脚本叫build.sh供用户使用(目前只做了Linux系统的脚本,Windows系统用户可以自己做一个脚本或者手动操作),其内容是 编译,拷贝(把/target/debug/rssust拷贝到/env,接着运行。

Cookies的防止

在与二进制文件同目录下的cookies.json中如下: 示例格式: { “name”: “session_id”, “value”: “abc123”, “domain”: “.example.com”, “path”: “/”, “secure”: true, “httpOnly”: true, “sameSite”: “Lax”, “expirationDate”: 1893456000 } 所有的cookies挤在同一个json文件,程序运行时按需读取(easyuser::load_cookie_header() 会按域名过滤拼装成 Cookie 头),无需启动时导入。 Tips:可以使用扩展 Cookie-Editor导出为json到剪贴板再合并。

文档的编写!

在env/docs_md/下新建 你的路由名.md的文件,复制粘贴一下再慢慢填:

# Router-name: 
**Commit time:** 
**Cookies?:** 
**Author:** 
**Introduction:** 
**Address:** 
**Example:** 
**Parameter:** 
**Environment Variables:**

首先除了**Cookies?:**,**Environment Variables:**和**Parameter:** ,其余基本上都是字面意思,但我还是介绍一下:

  1. Router-name: 填路由名
  2. Commit time: 提交时间,以年.月.日的形式填写
  3. Cookies?: 两种情况,一种为no,一种为yes,后面也可以写备注解释
  4. Author: 提交人,写你的Github名
  5. Introduction: 写一下简介(注意,如果平台以什么语言为主就用什么语言)
  6. Address: 填 rssust://路由名就好
  7. Example: 可选项,如果要选就要用超链接[填Address相同的](填/路由名)
  8. Parameter: 这个意思是http get时可能用到的参数,可以填no, 或者空着,另起一行,像下面的示例
**Parameter:** 
1. **disableembed** 
   Type of parameter: bool
   Default value: true
   Meaning: 内嵌视频
2. 接下来如法炮制

注意:必填的项目把默认值设为null 其中的参数名称跟在序号后面,用** **包裹强调 Type of parameter: 填类型,自己定 Default value: 默认值,要符合Type of parameter Meaning: 参数的含义 9. Environment Variables: 可能用到的环境变量,填no,或者空着,另起一行,像下面的示例

**Parameter:** 
1. **disableembed** 
   Type of parameter: bool
   Default value: true
   Meaning: 内嵌视频
2. 接下来如法炮制

注意:必填的项目把默认值设为null,每个项目的意思参考Parameter: 的子项

最后一步:提交!

使用git提交前,先运行cargo fmt,这可以使别人更好的识别你的代码 你需要提交的有:

  1. /src/router/你的路由名.rs
  2. env/docs_md/路由名.md (一般情况下请不要提交您的路由名.html文件)
  3. /src/router/mod.rs以及src/request_rules.rs

这只是路由的指南,如果你想改进核心代码,欢迎提交关于代码的改进,完善

如果好奇程序构造的,可以看rogram_explanation_cn

中文

Router Development Guide

This document is for both humans and AI to read.

Before you start developing, you need:

  • A standard Cargo environment
  • Git version control system
  • An editor
  • Basic Rust knowledge, preferably through the official book, and familiarity with frequently used methods in the std library, such as various error handling methods for recoverable errors, etc.
  • RSS knowledge from: Official RSS 2.0.11 English or Blog Garden - Translated by Xiao Y RSS 2.0.10 Chinese
  • Knowledge of RSS Crates, understanding how to build an RSS feed. Official English Documentation Especially ChannelBuilder and ImageBuilder
  • Since different upstream APIs have different formats, you need to learn different methods. For example, if your upstream API is in JSON format, you likely only need to learn the .pointer() and .get() methods from the serde_json Crate. If you need to directly process HTML and DOM, you need the methods recommended in the scraper documentation, and be careful to avoid causing panic!!!

You can create your own .rs file under /src/router, but there are some requirements:

  1. Filenames can only contain lowercase letters, numbers, underscores, and the fixed .rs extension. Absolutely no spaces in any filename or URL path!
  2. Router naming convention is: platform_lowercase_english_name_function_lowercase_english_name
  3. The filename part (excluding the .rs extension) becomes your router name
  4. Each router must have a corresponding documentation file named router_name.md under env/docs_md; more details later
  5. Each router can only correspond to one function

Before developing, it’s best to compile once first. Incremental compilation is already enabled in development mode. The first compilation will take less than ten minutes to download many Crates, and subsequent compilations will complete in about ten seconds. Build scripts build_dev.sh and build.bat are provided.

Import Libraries

#![allow(unused)]
fn main() {
use std::collections::HashMap;
use crate::easyuser::*;
use anyhow::*;
use rss::*;
}

The above libraries must be imported. Import the following as needed:

#![allow(unused)]
fn main() {
use serde_json::Value;  // for JSON
use scraper::*;  // for HTML
}

The main function signature for each router should look like this:

#![allow(unused)]
fn main() {
pub async fn get(para: HashMap<String,String>) -> Result<String, Error> {
}
}

The function signature and return type cannot be changed! (If you don’t use the para variable, you can write it as _para so the compiler won’t warn you). The purpose of para is to receive parameters passed via HTTP GET protocol when users access the router, serialized into HashMap format.

Note the async keyword: since the fetching helpers (fetch_reqwest_get, etc.) are async, get itself must be async so it can .await them.

Common async errors (the pitfalls you’ll actually hit)

These are the compile errors you’re most likely to see in a new router, listed by error message. Find yours and fix it.

1. await is only allowed inside async functions and blocks (E0728)

You wrote .await in a function that is not async. This most often happens when you extract the “fetch detail page” logic into a plain helper function:

#![allow(unused)]
fn main() {
// wrong: helper is not async but tries to await
fn fetch_detail(url: &str) -> Result<String, Error> {
    fetch_reqwest_get(url).await?   // E0728
}
}

Make it async fn — and .await the call site too:

#![allow(unused)]
fn main() {
async fn fetch_detail(url: &str) -> Result<String, Error> {
    fetch_reqwest_get(url).await?
}
let detail = fetch_detail(&url).await?;
}

2. Result<String, Error> is not a future (E0277)

You forgot .await. fetch_reqwest_get(url) does not return a String — it returns a Future that will become a String later. Only .await turns it into one:

#![allow(unused)]
fn main() {
// wrong: you got a Future, not a String
let html = fetch_reqwest_get(&url)?;
// right: add .await to get the String
let html = fetch_reqwest_get(&url).await?;
}

Audit every fetch_reqwest_get / fetch_reqwest_post / fetch_reqwest_get_with_headers call in your file and make sure each one has .await.

3. future cannot be sent between threads safely (E0277, scraper only)

You only hit this when parsing HTML with scraper. Html, Selector, and ElementRef are not Send, so they can’t survive across an .await. Typical case: you parse a list into doc, then loop over links fetching detail pages:

#![allow(unused)]
fn main() {
// wrong: doc (an Html) is still alive across the .await
let doc = Html::parse_document(&html);
for link in &links {
    let detail_html = fetch_reqwest_get(link).await?;   // error: doc is still alive here
}
}

Fix it with a two-phase “parse first, fetch later” pattern. Step one: fully parse the list page, collecting every field into String/Vec<String> inside a { } block (so doc drops at the block end). Step two: loop and fetch — now you only hold plain data:

#![allow(unused)]
fn main() {
// step 1: parse the list, collect only Strings. doc drops at the end of the block
let items: Vec<(String, String)> = {
    let doc = Html::parse_document(&html);
    let sel = Selector::parse("a.title").unwrap();
    doc.select(&sel).map(|e| {
        let title = e.text().collect::<String>().trim().to_string();
        let href = e.value().attr("href").unwrap_or("").to_string();
        (title, href)
    }).collect()
};
// step 2: no scraper types around, feel free to await
for (title, href) in &items {
    let detail_html = fetch_reqwest_get(href).await?;
}
}

4. Need scraper for the detail page too? Same rule: parse, then let it go.

If you fetch a detail page and then need to parse it (or even fetch the next page), keep the same principle: drop detail_doc as soon as you’re done with it. The idiomatic way is to parse inside if let Ok(...) = fetch(...).await { ... } — the doc is created, used, and released inside that block, and never referenced outside it.

TL;DR: whenever you .await, don’t hold Html/Selector/ElementRef. If you see not Send, remember this.

Reference implementations: chinanews, stcn_article_list, bjnews_cat, eastday_24, solidot, guancha_headline, guanhai, ithome_ranking, jianshu_home follow this pattern.

A complete minimal router (JSON endpoint version)

Here’s a full example you can copy. It fetches a JSON endpoint and turns it into RSS. Save it as src/router/my_test.rs and it compiles as-is:

#![allow(unused)]
fn main() {
use crate::easyuser::*;          // fetching helpers, date utils, etc.
use anyhow::{Error, Result};
use rss::*;                       // RSS generation
use serde_json::Value;            // JSON parsing
use std::collections::HashMap;

pub async fn get(para: HashMap<String,String>) -> Result<String, Error> {
    // 1. read user params (optional, with a default)
    let id = para.get("id").cloned().unwrap_or_default();

    // 2. fetch upstream. Note: fetch is async, add .await
    let html = fetch_reqwest_get(&format!("https://api.example.com/list?id={}", id)).await?;

    // 3. parse JSON
    let json: Value = serde_json::from_str(&html)?;
    let list = json["data"]["list"].as_array().ok_or_else(|| anyhow!("no list field"))?;

    // 4. convert each entry into an RSS Item
    let mut item_vec = Vec::new();
    for item in list {
        let rss_item = ItemBuilder::default()
            .title(Some(item["title"].as_str().unwrap_or("").to_string()))
            .link(Some(item["url"].as_str().unwrap_or("").to_string()))
            .description(item["desc"].as_str().unwrap_or(""))
            .pub_date(now())           // use now() if you can't parse the date yet
            .build();
        item_vec.push(rss_item);
    }

    // 5. assemble the channel
    let channel = ChannelBuilder::default()
        .title("My test channel")
        .link("https://api.example.com")
        .description("example")
        .items(item_vec)
        .build();
    Ok(channel.to_string())
}
}

After writing it, follow the two registration steps below, run cargo build, start the server and visit /my_test to see your RSS. If your upstream serves HTML instead of JSON, replace step 3 with scraper parsing (watch out for errors 3 and 4 above).

The project has encapsulated some convenient functions for users, which you can check in src/easyuser.rs or view at easyuser_cn.html.

The specific program logic is up to you to write.

How to register it after writing?

In /src/router/mod.rs, add a new line at the end: pub mod your_router_name;

Then in src/request_rules.rs, add one line (in alphabetical order) to the routes! { ... } block, following the pattern of other entries:

#![allow(unused)]
fn main() {
("/your_router_name", your_router_name),
}

The routes! macro generates:

  • pub const ROUTES: &[&str] (path array) and ROUTE_COUNT (total count)
  • pub async fn route_dispatch() — internally uses match url to dispatch each path to your_router_name::get(...)

So don’t hand-write a match url arm or change the macro shape. After registering, run ./env/rssust docs and the new route is automatically written into SUMMARY.md and official/routes.md.

How to run after registration?

I’m very strict about the necessary environment directories for the binary file. Files like cookies.json, the index folder, etc., must be in the same directory as the binary file. Therefore, I created an env folder where all necessary environments are located. It should look like this:

├── cookies.json
├── docs_md
│   ├── .......md
│   └── official
│       └── ......md
├── index
│   ├── 404.html
│   └── index.html
└── rssust

I’ve also written a script called build.sh for users (currently only Linux scripts available; Windows users can write their own script or do it manually). Its content: compile, copy (copy /target/debug/rssust to /env), then run.

In cookies.json in the same directory as the binary file, use the following format:

Example format:

{
  "name": "session_id",
  "value": "abc123",
  "domain": ".example.com",
  "path": "/",
  "secure": true,
  "httpOnly": true,
  "sameSite": "Lax",
  "expirationDate": 1893456000
}

All cookies are in the same JSON file, which is read on demand at runtime (easyuser::load_cookie_header() builds the Cookie header filtered by domain); no import at startup.

Tips: You can use the Cookie-Editor extension to export as JSON to clipboard and then merge.

Documentation Writing!

Create a file named your_router_name.md under env/docs_md, copy and paste the template below and fill it in:

# Router-name: 
**Commit time:** 
**Cookies?:** 
**Author:** 
**Introduction:** 
**Address:** 
**Example:** 
**Parameter:** 
**Environment Variables:**

First, except for **Cookies?:**, **Environment Variables:**, and **Parameter:**, the rest are mostly self-explanatory, but I’ll introduce them anyway:

  1. Router-name: Fill in the router name
  2. Commit time: Submission time, formatted as year.month.day
  3. Cookies?: Two cases: no or yes, with optional remarks after
  4. Author: Submitter, write your GitHub username
  5. Introduction: Write a brief introduction (note: if the platform is mainly in a certain language, use that language)
  6. Address: Fill in rssust://router_name
  7. Example: Optional; if included, use a hyperlink: [fill Address same as above](/router_name)
  8. Parameter: This means HTTP GET parameters that might be used. You can fill in no, leave it empty, or start a new line with the following format:
**Parameter:** 
1. **disableembed** 
   Type of parameter: bool
   Default value: true
   Meaning: Embedded videos
2. Continue similarly for other parameters

The parameter name follows the number, wrapped with ** ** for emphasis.

Type of parameter: Fill in the type, define it yourself Default value: Default value, must conform to the Type of parameter Meaning: The meaning of the parameter

Final Step: Submit!

Before submitting with git, run cargo fmt first. This helps others better understand your code.

You need to submit:

  1. /src/router/your_router_name.rs
  2. env/docs_md/router_name.md (generally please do not submit your router_name.html file)
  3. /src/router/mod.rs and src/request_rules.rs

This is just a guide for routers. If you want to improve the core code, feel free to submit improvements to the code!

If you are insterested in pogram explanation,please turn to pogram_explanation_cn,but now it only has Chinese.

本文由AI撰写,但其他不是哦!

入口函数 - main.rs

入口函数

src/main.rs:14 — #[tokio::main] async fn main() 是整个程序的入口。

功能流程

  1. 配置初始化:调用 config::init() 确保 config.toml 存在
  2. 命令行参数处理:
    • 第一个参数为 "docs" → 调用 doc_generate() 生成文档 HTML
    • 第一个参数为 "cookie" → 调用 extract_cookies_to_json() 导出浏览器 cookie
  3. 启动 TCP 服务器:绑定 127.0.0.1:配置的端口(config.toml 的 server.port,默认 7878),使用 tokio 异步运行时,tokio::spawn 并发处理请求(Semaphore 信号量限制并发上限)
  4. 请求处理:每个连接由 handle_connection() 处理(定义在 lib.rs 的 connect 模块)

架构图

用户 HTTP 请求
    ↓
TcpListener(:7878)  (tokio::spawn 每个连接一个任务)
    ↓  (Semaphore 并发限流)
handle_connection(stream)
    ↓
解析 HTTP 请求头 (GET /xxx?key=val HTTP/1.1)  + keep-alive 处理
    ↓
root_rules(url, params)
    ├── "/"          → show_index_doc().await   → index.html
    ├── "/favicon.ico" → serve_static(...)      → 图标文件
    ├── "/docs/*"    → serve_static(...)        → 文档 HTML
    ├── "/index/*"   → serve_static(...)        → 静态资源
    ├── "/status"    → 内联生成 JSON 状态(路由数/缓存/请求统计,默认关闭,需 [server] status_route = true)
    └── 其他路由       → request_rules(url, params).await
                          ├── 检查 routes.disabled → 禁用则 404
                          ├── 检查 routes.rate_limit → 缓存命中则直接复用
                          └── route_dispatch(url, params).await
                                └── 路由器名::get(params).await  → RSS XML

环境目录结构

二进制运行所需的目录结构:

env/
├── config.toml       # 配置文件(自动创建)
├── cookies.json      # Cookie 文件
├── index/
│   ├── 404.html      # 404 页面
│   ├── favicon.ico   # 站点图标
│   └── index.html    # 首页
├── docs_md/          # Markdown 文档源文件
│   ├── official/     # 官方文档(含自动生成的 routes.md 路由清单)
│   ├── SUMMARY.md    # 导航目录(rssust docs 自动生成)
│   └── 路由名.md     # 各路由的文档
├── docs/             # rssust docs 生成的 HTML 文档
└── rssust            # 编译后的二进制

crawler 模块 — lib.rs(已禁用)

注意:crawler 模块目前在 src/lib.rs 中已被注释掉(/* ... */),当前版本不可用。以下文档仅作历史参考。

位置

src/lib.rs 中的 pub mod crawler 模块(已注释)。

概述

管理无头浏览器(Obscura)实例和 Cookie 的生命周期。所有浏览器操作通过线程局部存储(thread_local!)实现,每个线程持有独立的浏览器实例。

核心类型

Coke

内部结构体,存储处理后的 Cookie 信息:

#![allow(unused)]
fn main() {
struct Coke {
    url: String,    // 域名
    mai: String,    // Set-Cookie 字符串
}
}

BROWSER(线程局部变量)

#![allow(unused)]
fn main() {
thread_local! {
    static BROWSER: RefCell<Option<(tokio::runtime::Runtime, Browser)>> = RefCell::new(None);
}
}

每个线程第一次使用时创建 Runtime + Browser 实例,后续复用。

核心函数

with_browser()

签名: pub fn with_browser<F, T>(f: F) -> Result<T>

获取当前线程的浏览器实例,执行闭包。如果浏览器尚未初始化,则自动创建:

  • 使用 tokio::runtime::Builder 创建单线程运行时
  • 调用 Browser::new() 创建 Obscura 无头浏览器实例

load_cookies()

签名: pub fn load_cookies() -> Result<String, Error>

从二进制同目录的 cookies.json 加载 Cookie:

  1. 读取 JSON 文件(空文件跳过)
  2. 反序列化为 Vec<Value>(Cookie 对象数组)
  3. 对每个 Cookie 调用 build_set_cookie() 转换为 Coke 结构
  4. 调用 init() 注入到全局浏览器

init()

签名: fn init(cookies: &[Coke]) -> Result<()>

将 Cookie 注入到浏览器实例中,通过 browser.cookies().set() 设置。

签名: fn build_set_cookie(cookie: &Value) -> Result<Coke>

将 JSON Cookie 对象转换为 HTTP Set-Cookie 字符串:

  • 必填字段:name, value, domain
  • 可选字段:path(默认 /), secure, httpOnly, sameSite, expirationDate
  • expirationDate 会计算 Max-Age 并附加到字符串

fetch()

签名: pub fn fetch(url: &str) -> Result<String>

使用无头浏览器访问指定 URL,返回页面 HTML 内容:

  1. 创建新页面(new_page())
  2. 导航到 URL(goto())
  3. 返回页面内容(content())

connect 模块 - lib.rs

位置

src/lib.rs 中的 pub mod connect 模块。

核心函数

handle_connection()

签名: pub async fn handle_connection(mut stream: TcpStream)

这是每个 HTTP 请求的入口处理函数,基于 tokio 异步 IO:

  1. 用 read_head() 从 TCP 流读取完整请求头(直到 \r\n\r\n),超过 30 秒无数据返回 TimedOut
  2. 解析 HTTP 请求行,提取方法、URL 路径(GET 和 POST 之间的部分)
  3. 解析 URL 中的查询参数:
    • 如果 URL 包含 ?,用 split_once('?') 分割路径和查询字符串
    • 查询字符串通过 params_to_hashmap() 转为 HashMap
  4. 判断 keep-alive:仅文档/静态路由(/、/docs/*、/index/*、/favicon.ico)保持连接,其余动态路由一律 Connection: close
  5. 获取 Semaphore 许可后,用 tokio::spawn 将请求任务调度到 worker 线程,调用 root_rules(path, params).await 获取响应
  6. 根据 ShowToUser 枚举类型构建 HTTP 响应:
    • ShowToUser::Html → Content-Type: text/html
    • ShowToUser::Rss → Content-Type: application/xml
    • ShowToUser::File → 对应的 MIME 类型(css/js/svg/png 等)
  7. 写回 TCP 流;keep-alive 下循环读取下一个请求(buf.drain(..head_len) 复用缓冲)

read_head()

签名: async fn read_head(stream: &mut TcpStream, buf: &mut Vec<u8>) -> std::io::Result<Option<usize>>

读取完整请求头。返回 Ok(None) 表示对端干净关闭;Err(TimedOut) 表示空闲超时(30 秒);Err(UnexpectedEof) 表示连接中断。

parse_keep_alive()

签名: fn parse_keep_alive(head: &str, version: &str) -> bool

解析 Connection 头。HTTP/1.1 默认 keep-alive(除非显式 Connection: close);HTTP/1.0 需显式 Connection: keep-alive。

show_index_doc()

签名: pub async fn show_index_doc() -> Result<String, Error>

读取二进制同目录下的 index/index.html 文件,返回 HTML 字符串。

show_doc()

签名: pub async fn show_doc(path: &str) -> Result<String, Error>

读取二进制同目录下的文档 HTML 文件(如 /docs/new_router_cn.html → 读取 docs/new_router_cn.html)。如果文件不存在,返回 index/404.html。

ShowToUser 枚举

定义在 request_rules.rs 中,但被 connect 模块使用:

#![allow(unused)]
fn main() {
pub enum ShowToUser {
    Html { res: Result<String, Error> },
    Rss { res: Result<String, Error> },
    File { res: Result<String, Error>, content_type: String },
}
}
  • Html — 返回 HTML 页面(首页、文档页面、错误页面)
  • Rss — 返回 RSS XML(路由器的输出)
  • File — 返回静态文件(CSS/JS/图片/字体等)

路由注册表 - request_rules.rs

位置

src/request_rules.rs

概述

这是整个项目的路由调度中心。负责将 URL 路径分发给对应的处理器,并封装返回格式。

ShowToUser 枚举

#![allow(unused)]
fn main() {
pub enum ShowToUser {
    Html { res: Result<String, Error> },
    Rss { res: Result<String, Error> },
    File { res: Result<String, Error>, content_type: String },
}
}
  • Html — 返回 HTML 页面
  • Rss — 返回 RSS XML
  • File — 返回静态文件

核心函数

root_rules()

签名: pub async fn root_rules(first_part: &str, second_part: HashMap<String, String>) -> ShowToUser

一级路由分发函数:

URL 路径处理器返回类型
"/"show_index_doc()ShowToUser::Html
"/favicon.ico"serve_static("/index/favicon.ico")ShowToUser::File
以 "/docs/" 或 "/index/" 开头serve_static(path)ShowToUser::Html 或 ShowToUser::File
"/status"内联拼接 JSON:{"status":"ok","uptime_secs":...,"routes":ROUTE_COUNT,"cache_entries":...,"requests":...,"failures":...}。默认关闭:未在 config.toml 的 [server] 设置 status_route = true 时返回 404ShowToUser::Html
其他request_rules()ShowToUser::Rss 或 Html(错误)

request_rules()

签名: pub async fn request_rules(url: &str, parameters: HashMap<String, String>) -> Result<String, anyhow::Error>

二级路由分发入口,先做两层前置检查,再交给 route_dispatch():

  1. 禁用检查:is_route_disabled(url) 命中 config.toml 的 routes.disabled 列表 → 直接返回 HttpError::not_found("404NotFound")
  2. 限速缓存:rate_limit_secs(url) 读取 routes.rate_limit 配置,若有值则开启缓存作用域(with_cache_scope)——缓存间隔内的重复请求直接复用上次响应,生成失败时自动清理缓存
  3. 分发:调用 route_dispatch(url, parameters).await

route_dispatch() 与 routes! 宏

route_dispatch() 由文件顶部的 routes! 宏自动生成。宏展开后定义三个东西:

  • pub const ROUTES: &[&str] — 全部已注册路由路径的数组(供 /status 统计 ROUTE_COUNT 等使用)
  • pub const ROUTE_COUNT: usize — 路由总数
  • pub async fn route_dispatch(url: &str, parameters: HashMap<String, String>) -> Result<String, anyhow::Error> — 用 match url 把路径分发到对应的 路由器名::get()

宏观展开后的等价代码形如:

#![allow(unused)]
fn main() {
pub async fn route_dispatch(
    url: &str,
    parameters: HashMap<String, String>,
) -> Result<String, anyhow::Error> {
    match url {
        "/bilibili_weekly" => bilibili_weekly::get(parameters.clone()).await,
        "/bilibili_dynamic" => bilibili_dynamic::get(parameters.clone()).await,
        // ... 其他路由(由 routes! 宏展开)
        _ => {
            warn!("Unregistered route: {}", url);
            Err(HttpError::not_found("404NotFound").into())
        }
    }
}
}

实际代码中不需要手写 match,只需在 request_rules.rs 的 routes! { ... } 块里按字母序加一条 ("/你的路由名", 你的路由名),,宏会自动生成上述分发逻辑。未注册的路径由 route_dispatch 兜底返回 404。

如何添加新路由

参考 new_router_cn.md,步骤:

  1. 在 src/router/ 下新建 .rs 文件,实现 pub async fn get(para: HashMap<String,String>) -> Result<String, Error>
  2. 在 src/router/mod.rs 中添加 pub mod 你的路由名;
  3. 在 src/request_rules.rs 的 routes! { ... } 块中按字母序添加 ("/你的路由名", 你的路由名), 条目(路径与模块名要一致)
  4. 在 env/docs_md/ 下编写对应的路由文档 .md 文件
  5. 运行 ./env/rssust docs 重新生成 SUMMARY(自动注册导航)与 official/routes.md 路由清单

文档生成器 - doc.rs

位置

src/doc.rs

概述

将 docs_md/ 目录下的 Markdown 文件批量转换为带样式的 HTML 文档页面。在终端中执行 ./env/rssust docs 触发。

核心函数

doc_generate()

签名: pub fn doc_generate() -> Result<(), Error>

执行流程

  1. 定位目录:以二进制文件所在目录为基础,输入目录为 ./docs_md,输出目录为 ./docs
  2. 生成 SUMMARY.md:自动扫描 docs_md/ 下的所有 .md 文件,按分类生成导航目录(官方文档 → 路由文档)
  3. 生成路由清单:调用 generate_api_file() 自动重写 official/routes.md——读取每个路由文档的 **Introduction:** 字段,按 #### 分组 归类输出 <a> 链接清单(分组信息取自旧版 routes.md,新路由默认归入 Other)
  4. 三方对账:调用 check_route_consistency() 比对 src/router/mod.rs 的 pub mod 声明、src/request_rules.rs 的 routes! 块、docs_md/路由名.md 文档三方路由集合,任何缺漏会输出 DOC-ISS 日志并使命令返回非零
  5. 转换:使用 mdbook 库将 Markdown 转为 HTML
  6. 后处理:
    • 将 official/ 子目录下的 HTML 提升到 docs/ 根目录;
    • 修复所有 HTML/JS 中的资源与页面链接路径(official/ 前缀、../css、../xxx.html 等,保留 API 示例链接 ../路由名?x=... 的 ../ 以指向根路由)

Routes provided by this server

本服务器所提供的路由清单


AP News

BJNews (新京报)

Baidu (百度热搜)

  • baidu_top 百度热搜榜单(实时/科技/娱乐等分类),数据取自 top.baidu.com 页面内嵌 JSON,无官方 RSS

Bilibili

CENC (中国地震台网中心)

Cailianpress (财联社)

  • cls_hot 财联社热门文章排行榜

Caixin (财新网)

Carnegie Endowment

  • carnegieendowment_news Carnegie Endowment for International Peace - International affairs think tank publications, events & videos (no official RSS)

Chinanews (中国新闻网)

DEV.to

  • devto_guides DEV.to Trending Guides (official RSS feed tag=guides)

Defense News

  • defensenews_news Defense News - Global Defense & Military News (no official RSS, scraped)

Defense One

  • defenseone_news Defense One - Defense & National Security News (no official RSS)

Discover Magazine

Douban

EEO (经济观察报)

Eastday (东方资讯)

Gelonghui (格隆汇)

  • gelonghui_home 格隆汇首页,支持分类(推荐/股票/基金/新股/研报)

GitHub

Guancha (观察者网)

Guanhai (观海新闻)

Guokr (果壳网)

Hacker News

  • hackernews Hacker News Stories (official Algolia API)

IT之家

Jianshu (简书)

Juejin (掘金)

Kali Linux

  • kali_blog Kali Linux 官方博客(blog.kali.org 的更新,含发布日志与工具介绍)

LWN

  • lwn LWN.net(Linux 内核与技术新闻)官方 RSS 转接

Leiphone (雷锋网)

MIT Technology Review (麻省理工科技评论)

  • mittrchina MIT Technology Review 麻省理工科技评论中文站

MOE (教育部)

  • moe_news 教育部司局要闻列表(服务端渲染 HTML,无官方 RSS)

NASA

  • nasa_apod NASA 每日天文一图(APOD),官方公开 API,无官方 RSS

NMC (中央气象台)

NetEase

OpenAI

Other

  • cas_research 中国科学院科研进展列表(服务端渲染 HTML,无官方 RSS,robots.txt 不存在视为允许;pubDate 取链接文件名 tYYYYMMDD 中的发布日期)
  • gamersky_news 游民星空(gamersky)游戏资讯列表(服务端渲染 HTML,无官方 RSS,robots.txt 仅禁 /indexbeta/)
  • jiemian_news 界面新闻(jiemian)要闻列表(服务端渲染 HTML,无官方 RSS,robots.txt 全允许)
  • mydrivers_news 快科技(mydrivers)今日资讯列表(服务端渲染 HTML,无官方 RSS,robots.txt 全允许)
  • nbd_news 每经网(nbd)今日要闻列表(服务端渲染 HTML,无官方 RSS,robots.txt 全允许)

PingWest (品玩)

  • pingwest_news 品玩 PingWest 首页精选资讯(无官方 RSS,抓取首页静态区块)

Rail12306 (中国铁路12306)

STCN (证券时报网)

  • stcn_article_list 证券时报网文章列表,按分类(要闻/股市/公司/基金/金融/评论/产经/科创板/新三板/ESG/滚动)
  • stcn_kx 证券时报网快讯
  • stcn_rank 证券时报网热榜(按分类)

Scientific American

Scripts (脚本路由)

Sina (新浪)

  • sina_finance 新浪财经 7×24 直播快讯(公开 JSON API,无官方 RSS)

Smithsonian Magazine

  • smithsonianmag_news Smithsonian Magazine - Science, History & Culture (official RSS returns 403)

Solidot

  • solidot 奇客的资讯,重要的东西

TMTpost (钛媒体)

ThePaper

Toutiao (今日头条)

  • toutiao_hot 今日头条热榜(公开 JSON API,无官方 RSS)

VideoCardz

  • videocardz_news VideoCardz.com - Latest GPU & Hardware News (English tech site, no official RSS)

WallStreetCN

Yicai (第一财经)

Zhihu

crates.io

  • crates_new crates.io 最新发布的 Rust crate 聚合(官方公开 API,无官方 RSS)

iFeng (凤凰网)

rhai 脚本路由(scripts feature)

Dynamic RSS routes written in rhai scripts. Compile with --features scripts, drop a .rhai file into the scripts/ directory next to the executable, and the route goes live without touching Rust code.

用 rhai 脚本写动态 RSS 路由。编译时加 --features scripts,把 .rhai 文件丢进 exe 同目录的 scripts/ 文件夹,路由即刻生效,不用改 Rust 代码。

启用 / Enable

# 带脚本路由编译
cargo build --release --features scripts

# 或者跟其他 feature 一起
cargo build --release --all-features

scripts 不在 default 里(default = ["docs", "cookie"]),所以不显式开启就没有这个能力。

脚本放哪 / Where scripts live

env/
├── rssust          # 可执行文件
└── scripts/        # 脚本目录,平铺,不分子文件夹
    ├── bilibili_partion_ranking_script.rhai  → /bilibili_partion_ranking_script
    └── bilibili_search_hot_script.rhai       → /bilibili_search_hot_script

路由名 = 文件名去掉 .rhai,命名跟静态路由一个风格(全小写下划线);跟内置路由重名的加 _script 后缀, bilibili_search_hot_script 就是内置 bilibili_search_hot 的脚本版。 scripts/ 下不递归子目录,子文件夹里的脚本会被忽略。

什么时候生效 / When it runs

静态路由(src/request_rules.rs 里的 routes! 宏)先匹配,没命中才回退到脚本路由:

  • 静态路由存在 → 走静态路由,脚本不会被执行(脚本不要跟静态路由重名,否则等于失效)
  • 静态路由不存在,且 scripts/ 里有同名文件 → 走脚本
  • 两边都没有 → 404

config.toml 的 routes.disabled 与 routes.rate_limit 对脚本路由同样生效,键名要带前导斜杠:

[routes]
disabled = ["/bilibili_search_hot_script"]
rate_limit = { "/bilibili_partion_ranking_script" = 60 }

脚本怎么写 / Script anatomy

脚本是纯数据处理:不发网络请求。Rust 侧按 //@source 抓取上游,把响应文本注入 raw,脚本解析后 return 一个数组。

顶部元数据注释:

注释必填作用
//@name 标题否RSS 频道标题;不写则用 脚本 /路由名
//@source URL是上游抓取地址,支持 {参数名} 占位;缺失时请求返回 500
//@item 选择器否预留字段,目前不生效

频道简介(<description>)取 let doc 里的首个非标题行;没有 let doc 时用 rhai 脚本路由 /路由名。

//@source 里的 {参数名} 会被 URL 查询参数替换,例如 /bilibili_partion_ranking_script?rid=36 把 {rid} 换成 36。 没传的参数会原样留在 URL 里(rid={rid}),上游多半返回错误结构,表现为脚本执行失败:

脚本 /bilibili_partion_ranking_script 执行失败: Indexer unavailable: () [string] (line 15, position 25)

脚本里还可以写一段 markdown 文档(RSSHub 风格):

let doc = `# 标题

第一行非标题内容会作为 RSS 频道简介。

- 补充说明写在这里
`;

rssust docs 会从 scripts/ 里提取这段 markdown 渲染成 HTML 文档页(不往仓库里写 .md 文件), 同时出现在文档站侧栏和路由清单的 Scripts (脚本路由) 分组里。

注入的变量 / Injected scope

变量类型说明
raw字符串//@source 抓回来的原始响应体
paramsmapURL 查询参数,如 params["rid"]

返回值 / Return value

必须 return 一个数组,每个元素是对象,字段按名字取,缺哪个都不报错:

字段必填说明
title是条目标题
link是条目链接
description否条目描述(HTML 片段,会放进 CDATA)
pub_date否发布时间字符串,原样写进 <pubDate>
author否作者

title 和 link 同时为空的条目会被丢弃;description 不给会输出空的 <description><![CDATA[]]></description>。

完整示例 / Full example

scripts/bilibili_partion_ranking_script.rhai:

//@name B站分区排行榜(脚本示例)
//@source https://api.bilibili.com/x/web-interface/ranking/v2?rid={rid}&type=all

let doc = `# B站分区排行榜(脚本示例)

内置 bilibili_partion_ranking 的脚本版,换用官方 ranking/v2 接口,{rid} 传分区。

- 路由: /bilibili_partion_ranking_script?rid=36
- rid 取值: 0 全部 / 3 音乐 / 4 游戏 / 36 知识 / 188 科技 / 160 生活
`;

let data = parse_json(raw);
let result = [];
for item in data["data"]["list"] {
    let up = item["owner"]["name"];
    result.push(#{
        "title": item["title"],
        "link": "https://www.bilibili.com/video/" + item["bvid"],
        "description": "UP: " + up + " · 播放: " + item["stat"]["view"].to_string(),
        "pub_date": "",
        "author": up
    });
}
return result;

上游返回:

{ "code": 0, "data": { "list": [ { "title": "...", "bvid": "BV...", "owner": { "name": "..." }, "stat": { "view": 123 } } ] } }

对应产出:

<channel>
  <title>B站分区排行榜(脚本示例)</title>
  <link>https://api.bilibili.com/x/web-interface/ranking/v2?rid=36&amp;type=all</link>
  <description>内置 bilibili_partion_ranking 的脚本版,换用官方 ranking/v2 接口,{rid} 传分区。</description>
  <item>
    <title>前8天:穿越罗布泊无人区  第9天:主角突然换人</title>
    <link>https://www.bilibili.com/video/BV1soZJYUEKd</link>
    <description><![CDATA[UP: 央视新闻 · 播放: 5159432]]></description>
    <author>央视新闻</author>
  </item>
</channel>

热重载与报错 / Hot reload & errors

  • 服务器每 2 秒重扫一次 scripts/,文件 mtime 变了就重新编译,改脚本不用重启
  • 新增 / 删除 .rhai 文件同样 2 秒内生效(删掉后路由回到 404)
  • 语法错误不影响启动,其他路由照常工作,只有访问该路由时返回 500,错误信息带行号:
脚本 /bilibili_search_hot_script 编译错误: Unexpected ';' (line 3, position 9)
  • 运行期报错(类型不对、上游数据结构变了、脚本 panic)同样返回 500 并说明原因,不会拖垮 tokio 线程:
脚本 /my_route 执行失败: Data type incorrect: string (expecting i64) (line 4, position 31)

rhai 语法坑 / Gotchas

  • map 字面量必须写 #{ "k": "v" },不能写 { "k": "v" }
  • 没有三元运算符 a ? b : c,用 if ... { } else { }
  • 取不存在的键得到 (),判断要用 if x != () { ... }
  • JSON 用嵌套下标访问:data["data"]["list"][0]["title"];点号取字段不支持,d.data.list 会报 Unknown property
  • parse_json 依赖 rhai 的 serde feature(已在本项目开启)
  • 脚本里没有时间格式化能力,pub_date 要自己拼字符串,且不会被校验

相关文档

Router-name: apnews_topics

Commit time: 2026.07.24
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@zoenglinghou
Introduction: AP News headlines by topic
Address: rssust://apnews_topics
Example: rssust://apnews_topics
Parameter:
topic: 话题 (默认 trending-news, 可选 world/politics/business/technology/science/health/sports/entertainment)
Environment Variables: no

Router-name: baidu_top

Commit time: 2026.08.30
Cookies?: no
Author: AI制作 / huiinyg-rusting审核
Introduction: 百度热搜榜单(实时/科技/娱乐等分类),数据取自 top.baidu.com 页面内嵌 JSON,无官方 RSS
Address: rssust://baidu_top
Example: rssust://baidu_top
robots.txt: top.baidu.com 无 robots.txt,视为允许
Parameter:

  1. tab
    Type of parameter: string
    Default value: realtime
    Meaning: 热搜分类 tab,仅支持页面实际提供数据的以下值:realtime(实时热点)、game(游戏)、finance(财经)、sport(体育)、novel(小说)、car(汽车)。其它 tab 返回 400
    Environment Variables: no

Router-name: bilibili_audio_rank

Commit time: 2026.08.10
Cookies?: no
Author: AI转写 / huiinyg-rusting审核 - 原创设计(参照官方API/文档)
Introduction: B站音频榜单最新一期(热榜/原创榜)
Address: rssust://bilibili_audio_rank
Example: rssust://bilibili_audio_rank
Parameter:

  1. list_type
    Type of parameter: number
    Default value: 1
    Meaning: 榜单类型,1=热榜, 2=原创榜 Environment Variables: no

Router-name: bilibili_bangumi_follow

Commit time: 2026.08.10
Cookies?: yes (如目标用户设置隐私则需 cookies.json 的 bilibili.com Cookie)
Author: AI转写 / huiinyg-rusting审核 - 来源于RSShub@wdssmq
Introduction: 用户追番(追剧)列表,含总集数、最新一话与更新时间
Address: rssust://bilibili_bangumi_follow
Example: rssust://bilibili_bangumi_follow?vmid=14082
Parameter:

  1. vmid
    Type of parameter: number
    Default value: null
    Meaning: 目标用户 mid (必填)
  2. type
    Type of parameter: number
    Default value: 1
    Meaning: 查询类型, 1=追番, 2=追剧
  3. pn
    Type of parameter: number
    Default value: 1
    Meaning: 页码
  4. ps
    Type of parameter: number
    Default value: 15
    Meaning: 每页项数, 定义域 1-30 Environment Variables: no

Router-name: bilibili_blackroom

Commit time: 2026.08.10
Cookies?: no
Author: AI转写 / huiinyg-rusting审核 - 原创设计(参照官方API/文档)
Introduction: B站小黑屋封禁公示列表
Address: rssust://bilibili_blackroom
Example: rssust://bilibili_blackroom
Parameter:

  1. btype
    Type of parameter: number
    Default value: 空
    Meaning: 来源筛选,空=全部, 0=系统封禁, 1=风纪仲裁
  2. otype
    Type of parameter: number
    Default value: 0
    Meaning: 类型筛选,0=全部, 1=评论, 2=弹幕, 3=私信, 4=标签, 5=个人资料, 6=投稿, 8=专栏, 10=动态, 11=相簿
  3. pn
    Type of parameter: number
    Default value: 1
    Meaning: 页码,每页最多10项 Environment Variables: no

Router-name: bilibili_collection

Commit time: 2026.07.14
Cookies?: no
Author: huiinyg-rusting / AI辅助撰写文档
Introduction: B站合集(合集,不是系列)视频列表,通过 season_id 获取合集内的视频
Address: rssust://bilibili_collection
Example: rssust://bilibili_collection?uid=245645656&sid=529166
Parameter:

  1. uid
    Type of parameter: num
    Default value: null
    Meaning: B站用户 uid(必填)
  2. sid
    Type of parameter: num
    Default value: null
    Meaning: 合集 season_id(必填)
  3. sortreverse
    Type of parameter: bool
    Default value: true
    Meaning: 排序方向,true 为倒序,false 为正序
  4. pagenum
    Type of parameter: num
    Default value: 1
    Meaning: 页码
  5. pagesize
    Type of parameter: num
    Default value: 16
    Meaning: 每页视频数量
  6. disableembed
    Type of parameter: bool
    Default value: true
    Meaning: 是否内嵌视频播放器与封面图;设为 false 则仅显示文字描述
    Environment Variables: no

Router-name: bilibili_dynamic

Commit time: 2026.7.11
Cookies?: yes (使用cookies.json直接注入到reqwest,需要鲜活的cookies,反爬中等)
Author: AI大部分转写自RSShub/huiinyg-rusting收拾烂摊子和审核-AGPL-3.0协议(已被传染)
Introduction: 获取指定 Bilibili 用户的动态(综合、视频、图文、直播、转发等),生成 RSS 源。入口函数 pub async fn get(para: HashMap<String, String>) -> Result<String, Error>,位于 src/router/bilibili_dynamic.rs。内部调用 Bilibili 官方 API /x/polymer/web-dynamic/v1/feed/space。

Address: rssust://bilibili_dynamic
Example: /bilibili_dynamic?uid=538142100&hideGoods=true
Parameter:

  1. uid
    • Type of parameter: string (必填)
    • Default value: 无
    • Meaning: Bilibili 用户 UID
  2. showEmoji
    • Type of parameter: bool
    • Default value: false
    • Meaning: 是否将动态正文中的 emoji 文本替换为图片
  3. embed
    • Type of parameter: bool
    • Default value: true
    • Meaning: 视频动态是否内嵌 iframe 播放器
  4. useAvid
    • Type of parameter: bool
    • Default value: false
    • Meaning: 视频链接使用 av 号(默认使用 bv 号)
  5. directLink
    • Type of parameter: bool
    • Default value: false
    • Meaning: 链接直接跳转至内容页而非动态页
  6. hideGoods
    • Type of parameter: bool
    • Default value: false
    • Meaning: 是否隐藏带货类动态
  7. offset
    • Type of parameter: string
    • Default value: 空
    • Meaning: 翻页偏移量(从上次返回的 data.offset 取值,用于分页续抓)

Environment Variables: no

Router-name: bilibili_fav

Commit time: 2026.07.19
Cookies?: yes (bilibili.com)
Author: AI转写 / huiinyg审核 - 来源于RSShub@Qixingchen
Introduction: bilibili UP主非默认收藏夹
Address: rssust://bilibili_fav
Example: rssust://bilibili_fav?uid=756508&fid=50948568
Parameter:

  1. uid
    Type of parameter: number
    Default value: null
    Meaning: 用户 id,可在 UP 主主页中找到
  2. fid
    Type of parameter: number
    Default value: null
    Meaning: 收藏夹 ID,可在收藏夹 URL 中找到
  3. disableembed
    Type of parameter: bool
    Default value: true
    Meaning: 内嵌视频
    Environment Variables: no

Router-name: bilibili_followers

Commit time: 2026.08.11
Cookies?: yes (需 cookies.json 中的 bilibili.com Cookie 登录态)
Author: AI转写 / huiinyg-rusting审核 - 来源于RSShub@Qixingchen
Introduction: 某 UP 主的粉丝列表
Address: rssust://bilibili_followers
Example: rssust://bilibili_followers?vmid=2
Parameter:

  1. vmid
    Type of parameter: number
    Default value: 无
    Meaning: 目标用户 mid (必填)
  2. pn
    Type of parameter: number
    Default value: 1
    Meaning: 页码
  3. limit
    Type of parameter: number
    Default value: 20
    Meaning: 每页条数, 最大 20 Environment Variables: no

Router-name: bilibili_link_news

Commit time: 2026.07.19
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@Qixingchen
Introduction: bilibili 直播/小视频/相簿公告
Address: rssust://bilibili_link_news
Example: rssust://bilibili_link_news?product=live
Parameter:

  1. product
    Type of parameter: string
    Default value: null
    Meaning: 公告分类,live=直播, vc=小视频, wh=相簿
    Environment Variables: no

Router-name: bilibili_live_area

Commit time: 2026.08.11
Cookies?: no
Author: AI转写 / huiinyg-rusting审核 - 来源于RSShub@Qixingchen
Introduction: B站直播分区 (某分区下房间列表)
Address: rssust://bilibili_live_area
Example: rssust://bilibili_live_area?area_id=1&order=online
Parameter:

  1. area_id
    Type of parameter: string / number
    Default value: 无
    Meaning: 直播分区ID。支持父分区 id(如 1=娱乐,自动展开其下全部子分区合并房间)或子分区 id(如 86=英雄联盟)。可通过 room/v1/Area/getList 查询,新版接口只接受子分区 id 查房间。父分区子分区超过 20 个时报错,请改用子分区 id
  2. order
    Type of parameter: string
    Default value: 无
    Meaning: 排序方式, live_time=最新开播 / online=人气直播
  3. page_size
    Type of parameter: number
    Default value: 30
    Meaning: 每页条数, 最大 30
  4. page_no
    Type of parameter: number
    Default value: 1
    Meaning: 页码 Environment Variables: no

Router-name: bilibili_partion

Commit time: 2026.07.19
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@DIYgod
Introduction: bilibili 分区视频
Address: rssust://bilibili_partion
Example: rssust://bilibili_partion?tid=1
Parameter:

  1. tid
    Type of parameter: number
    Default value: null
    Meaning: 分区 id
  2. disableembed
    Type of parameter: bool
    Default value: true
    Meaning: 内嵌视频

分区 id 取值(全部-各分区):

全部分区动画番剧国创音乐舞蹈游戏知识科技运动汽车生活美食动物圈鬼畜时尚娱乐影视纪录片电影电视剧
0113167312943618823422316021121711915551811772311
Environment Variables: no

Router-name: bilibili_partion_ranking

Commit time: 2026.07.19
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@lengthmin
Introduction: bilibili 分区视频排行榜
Address: rssust://bilibili_partion_ranking
Example: rssust://bilibili_partion_ranking?tid=1&days=7
Parameter:

  1. tid
    Type of parameter: number
    Default value: null
    Meaning: 分区 id
全部分区动画番剧国创音乐舞蹈游戏知识科技运动汽车生活美食动物圈鬼畜时尚娱乐影视纪录片电影电视剧
0113167312943618823422316021121711915551811772311
  1. days
    Type of parameter: number
    Default value: 7
    Meaning: 最近多少天内的热度排序
  2. disableembed
    Type of parameter: bool
    Default value: true
    Meaning: 内嵌视频 Environment Variables: no

B站分区排行榜(脚本示例)

Introduction: 内置 bilibili_partion_ranking 的脚本版,换用官方 ranking/v2 接口,{rid} 传分区。

  • 路由: /bilibili_partion_ranking_script?rid=36
  • rid 取值: 0 全部 / 3 音乐 / 4 游戏 / 36 知识 / 188 科技 / 160 生活

路由信息

  • 路由路径: /bilibili_partion_ranking_script
  • 抓取地址: https://api.bilibili.com/x/web-interface/ranking/v2?rid={rid}&type=all
  • 类型: rhai 脚本(动态路由,编译需开启 scripts feature)
  • 脚本位置: exe 目录 scripts/ 下

启用方式: cargo build --features scripts 编译后,脚本路由自动生效。

Router-name: bilibili_popular

Commit time: 2026.07.12
Cookies?: no
Author: huiinyg-rusting / AI辅助撰写文档
Introduction: B站热门视频
Address: rssust://bilibili_popular
Example: rssust://bilibili_popular
Parameter:

  1. pn
    Type of parameter: num
    Default value: 1
    Meaning: 页码
  2. ps
    Type of parameter: num
    Default value: 20
    Meaning: 每页项数
  3. disableembed
    Type of parameter: bool
    Default value: true
    Meaning: 是否内嵌视频播放器与封面图;设为 false 则仅显示文字描述
    Environment Variables: no

Router-name: bilibili_precious

Commit time: 2026.07.12
Cookies?: no
Author: huiinyg-rusting / AI辅助撰写文档
Introduction: B站入站必刷宝藏视频,从 api.bilibili.com/x/web-interface/popular/precious 获取。注意:此为 B 站官方精选的全站历史经典视频(非实时热门榜,内容偏老属正常);实时热门请用 bilibili_popular
Address: rssust://bilibili_precious
Example: rssust://bilibili_precious
Parameter:

  1. disableembed
    Type of parameter: bool
    Default value: true
    Meaning: 是否内嵌视频播放器与封面图;设为 false 则仅显示文字描述
    Environment Variables: no

Router-name: bilibili_search_hot

Commit time: 2026.08.10
Cookies?: no
Author: AI转写 / huiinyg-rusting审核 - 来源于RSShub@CaoMeiYouRen
Introduction: B站热搜榜前10关键词
Address: rssust://bilibili_search_hot
Example: rssust://bilibili_search_hot
Parameter:
无参数 Environment Variables: no

B站热搜(脚本示例)

Introduction: 内置 bilibili_search_hot 的脚本版:Rust 侧抓取后注入 raw,脚本只做 JSON 解析。

  • 路由: /bilibili_search_hot_script
  • 上游: https://s.search.bilibili.com/main/hotword

路由信息

  • 路由路径: /bilibili_search_hot_script
  • 抓取地址: https://s.search.bilibili.com/main/hotword
  • 类型: rhai 脚本(动态路由,编译需开启 scripts feature)
  • 脚本位置: exe 目录 scripts/ 下

启用方式: cargo build --features scripts 编译后,脚本路由自动生效。

Router-name: bilibili_series

Commit time: 2026.07.12
Cookies?: no
Author: huiinyg-rusting / AI辅助撰写文档
Introduction: B站系列(!!!只能系列,不能合集)视频列表,通过 series_id 获取系列中的视频
Address: rssust://bilibili_series
Example: rssust://bilibili_series?series_id=534502
Parameter:

  1. series_id
    Type of parameter: num
    Default value: null
    Meaning: 系列合集ID(必填)
  2. disableembed
    Type of parameter: bool
    Default value: true
    Meaning: 是否内嵌视频播放器与封面图;设为 false 则仅显示文字描述
    Environment Variables: no

Router-name: bilibili_splash

Commit time: 2026.08.10
Cookies?: no
Author: AI转写 / huiinyg-rusting审核 - 原创设计(参照官方API/文档)
Introduction: B站APP端开屏广告信息(自动携带设备标识 buvid,无需登录)
Address: rssust://bilibili_splash
Example: rssust://bilibili_splash
Parameter:

  1. build
    Type of parameter: number
    Default value: 7660100
    Meaning: 客户端内部版本号(必须是真实存在的版本号,999999999 等假版本号不下发广告)
  2. mobi_app
    Type of parameter: string
    Default value: android
    Meaning: android, iphone, ipad
  3. platform
    Type of parameter: string
    Default value: android
    Meaning: android, ios
  4. height
    Type of parameter: number
    Default value: 1920
    Meaning: 屏幕高度
  5. width
    Type of parameter: number
    Default value: 1080
    Meaning: 屏幕宽度
  6. birth
    Type of parameter: string
    Default value: 0101
    Meaning: 生日日期(四位数,例 0101) Environment Variables: no

Router-name: bilibili_user_article

Commit time: 2026.07.19
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@lengthmin & Qixingchen
Introduction: bilibili UP 主图文(专栏)
Address: rssust://bilibili_user_article
Example: rssust://bilibili_user_article?uid=334958638
Parameter:

  1. uid
    Type of parameter: number
    Default value: null
    Meaning: 用户 id,可在 UP 主主页中找到
    Environment Variables: no

Router-name: bilibili_user_coin

Commit time: 2026.07.19
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@DIYgod
Introduction: bilibili UP 主投币视频
Address: rssust://bilibili_user_coin
Example: rssust://bilibili_user_coin?uid=208259
Parameter:

  1. uid
    Type of parameter: number
    Default value: null
    Meaning: 用户 id,可在 UP 主主页中找到
  2. disableembed
    Type of parameter: bool
    Default value: true
    Meaning: 内嵌视频
    Environment Variables: no

Router-name: bilibili_user_fav

Commit time: 2026.07.19
Cookies?: yes (bilibili.com)
Author: AI转写 / huiinyg审核 - 来源于RSShub@DIYgod
Introduction: bilibili UP 主默认收藏夹
Address: rssust://bilibili_user_fav
Example: rssust://bilibili_user_fav?uid=2267573
Parameter:

  1. uid
    Type of parameter: number
    Default value: null
    Meaning: 用户 id,可在 UP 主主页中找到
  2. disableembed
    Type of parameter: bool
    Default value: true
    Meaning: 内嵌视频
    Environment Variables: no

Router-name: bilibili_user_like

Commit time: 2026.07.19
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@ygguorun
Introduction: bilibili UP 主点赞视频
Address: rssust://bilibili_user_like
Example: rssust://bilibili_user_like?uid=208259
Parameter:

  1. uid
    Type of parameter: number
    Default value: null
    Meaning: 用户 id,可在 UP 主主页中找到
  2. disableembed
    Type of parameter: bool
    Default value: true
    Meaning: 内嵌视频
    Environment Variables: no

Router-name: bilibili_video_page

Commit time: 2026.07.19
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@sxzz
Introduction: bilibili 视频选集列表
Address: rssust://bilibili_video_page
Example: rssust://bilibili_video_page?bvid=BV1i7411M7N9
Parameter:

  1. bvid
    Type of parameter: string
    Default value: null
    Meaning: 可在视频页 URL 中找到
  2. disableembed
    Type of parameter: bool
    Default value: true
    Meaning: 内嵌视频
  3. limit
    Type of parameter: number
    Default value: 10
    Meaning: 返回集数
    Environment Variables: no

Router-name: bilibili_video_reply

Commit time: 2026.07.19
Cookies?: yes (bilibili.com 需包含 SESSDATA) / 未测试
Author: AI转写 / huiinyg审核 - 来源于RSShub@Qixingchen
Introduction: bilibili 视频评论
Address: rssust://bilibili_video_reply
Example: rssust://bilibili_video_reply?bvid=BV1vA411b7ip
Parameter:

  1. bvid
    Type of parameter: string
    Default value: null
    Meaning: 可在视频页 URL 中找到
    Environment Variables: no

Router-name: bilibili_vsearch

Commit time: 2026.07.19
Cookies?: yes (bilibili.com)
Author: AI转写 / huiinyg审核 - 来源于RSShub@pcrtool & DIYgod
Introduction: bilibili 视频搜索
Address: rssust://bilibili_vsearch
Example: rssust://bilibili_vsearch?kw=linux
Parameter:

  1. kw
    Type of parameter: string
    Default value: null
    Meaning: 检索关键字
  2. order
    Type of parameter: string
    Default value: pubdate
    Meaning: 排序,综合:totalrank 最多点击:click 最新发布:pubdate 最多弹幕:dm 最多收藏:stow
  3. disableembed
    Type of parameter: bool
    Default value: true
    Meaning: 内嵌视频
  4. tid
    Type of parameter: number
    Default value: 0
    Meaning: 分区 id
    Environment Variables: no

Router-name: bilibili_weekly

Commit time: 2026.07.09
Cookies?: no
Author: huiinyg-rusting
Introduction: Bilibili最新一期的每周精选
Address: rssust://bilibili_weekly
Example: rssust://bilibili_weekly?disableembed=true
Parameter:

  1. disableembed
    Type of parameter: bool
    Default value: true
    Meaning: 内嵌视频
    Environment Variables: no

Router-name: bjnews_cat

Commit time: 2026.07.25
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@dzx-dzx
Introduction: 新京报分类文章
Address: rssust://bjnews_cat
Example: rssust://bjnews_cat
Parameter:
cat: 分类 (默认 depth, 如 depth/opinion/views/column 等)
Environment Variables: no

Router-name: caixin_latest

Commit time: 2026.07.22
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@tpnonthealps
Introduction: 财新网最新文章
Address: rssust://caixin_latest
Example: rssust://caixin_latest
Parameter:
无参数
Environment Variables: no

Router-name: carnegieendowment_news

Commit time: 2026.08.01
Cookies?: no
Author: huiinyg
Introduction: Carnegie Endowment for International Peace - International affairs think tank publications, events & videos (no official RSS)
Address: rssust://carnegieendowment_news
Example: rssust://carnegieendowment_news
Parameter:
(No parameters) Environment Variables: no

Router-name: cas_research

Commit time: 2026.09.12
Cookies?: no
Author: AI制作 / huiinyg-rusting审核
Introduction: 中国科学院科研进展列表(服务端渲染 HTML,无官方 RSS,robots.txt 不存在视为允许;pubDate 取链接文件名 tYYYYMMDD 中的发布日期)
Address: rssust://cas_research
Example: rssust://cas_research
robots.txt: www.cas.cn 无 robots.txt,视为允许
Parameter: no
Environment Variables: no

Router-name: cenc_earthquake

Commit time: 2026.08.04
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub
Introduction: 中国地震台网中心 最新地震速报
Address: rssust://cenc_earthquake
Example: rssust://cenc_earthquake
Parameter:
limit(可选,最大 50,默认 20)
Environment Variables: no

Router-name: chinanews

Commit time: 2026.07.25
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@yuxinliu-alex
Introduction: 中国新闻网滚动新闻
Address: rssust://chinanews
Example: rssust://chinanews
Parameter:
无参数
Environment Variables: no

Router-name: cls_hot

Commit time: 2026.07.21
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@5upernova-heng, nczitzk
Introduction: 财联社热门文章排行榜
Address: rssust://cls_hot
Example: rssust://cls_hot
Parameter:
无参数
Environment Variables: no

Router-name: crates_new

Commit time: 2026.08.30
Cookies?: no
Author: AI制作 / huiinyg-rusting审核
Introduction: crates.io 最新发布的 Rust crate 聚合(官方公开 API,无官方 RSS)
Address: rssust://crates_new
Example: rssust://crates_new
robots.txt: crates.io 的 robots.txt 无通用禁止,允许抓取;请求须携带自定义 User-Agent
Parameter:

  1. count
    Type of parameter: int
    Default value: 10
    Meaning: 返回的 crate 条目数,范围 1-100
    Environment Variables: no

Router-name: defensenews_news

Commit time: 2026.08.06
Cookies?: no
Author: huiinyg
Introduction: Defense News - Global Defense & Military News (no official RSS, scraped)
Address: rssust://defensenews_news
Example: rssust://defensenews_news
Parameter:
limit (optional, max 15, default 15)
Note:
Fetches article dates in parallel (up to 10 concurrent) from detail pages. Environment Variables: no

Router-name: defenseone_news

Commit time: 2026.08.02
Cookies?: no
Author: huiinyg
Introduction: Defense One - Defense & National Security News (no official RSS)
Address: rssust://defenseone_news
Example: rssust://defenseone_news
Parameter:
(No parameters) Environment Variables: no

Router-name: devto_guides

Commit time: 2026.08.06
Cookies?: no
Author: AI-converted / huiinyg-reviewed - based on RSSHub
Introduction: DEV.to Trending Guides (official RSS feed tag=guides)
Address: rssust://devto_guides
Example: rssust://devto_guides
Parameter:
limit (optional, max 30, default 10) Environment Variables: no

Router-name: discovermagazine_news

Commit time: 2026.08.02
Cookies?: no
Author: huiinyg
Introduction: Discover Magazine - Science News (no official RSS)
Address: rssust://discovermagazine_news
Example: rssust://discovermagazine_news
Parameter:
(No parameters) Environment Variables: no

Router-name: douban_book_latest

Commit time: 2026.07.20
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@fengkx
Introduction: 豆瓣新书速递
Address: rssust://douban_book_latest
Example: rssust://douban_book_latest?type=fiction
Parameter:

  1. type
    Type of parameter: string
    Default value: all
    Meaning: 分类,可选 all / prose_poetry / fiction / history / biography / science / art / business / comics
    Environment Variables: no

Router-name: douban_book_rank

Commit time: 2026.07.20
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@xyqfer
Introduction: 豆瓣热门图书排行
Address: rssust://douban_book_rank
Example: rssust://douban_book_rank?type=fiction
Parameter:

  1. type
    Type of parameter: string
    Default value: null
    Meaning: 图书类型,fiction=虚构类, nonfiction=非虚构类,缺省合并两者
    Environment Variables: no

Router-name: douban_event_hot

Commit time: 2026.07.20
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@xyqfer
Introduction: 豆瓣同城热门活动
Address: rssust://douban_event_hot
Example: rssust://douban_event_hot?locationId=118172
Parameter:

  1. locationId
    Type of parameter: string
    Default value: 0
    Meaning: 位置 id,同城首页控制台执行 window.__loc_id__ 获取
    Environment Variables: no

Router-name: douban_movie_classification

Commit time: 2026.07.20
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@zzwab
Introduction: 豆瓣电影分类
Address: rssust://douban_movie_classification
Example: rssust://douban_movie_classification?sort=R&score=7.5&tags=Netflix
Parameter:

  1. sort
    Type of parameter: string
    Default value: U
    Meaning: 排序方式,U=近期热门, T=标记最多, S=评分最高, R=最近上映
  2. score
    Type of parameter: number
    Default value: 0
    Meaning: 最低评分
  3. tags
    Type of parameter: string
    Default value: null
    Meaning: 分类标签,多个用逗号分隔
    Environment Variables: no

Router-name: eastday_24

Commit time: 2026.07.25
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@nczitzk
Introduction: 东方资讯24小时热闻
Address: rssust://eastday_24
Example: rssust://eastday_24
Parameter:
category: 分类 (默认 社会, 可选 社会/娱乐/国际/军事/养生/汽车/体育/财经/游戏/科技/国内/宠物/情感/人文/教育)
Environment Variables: no

Router-name: eeo_kuaixun

Commit time: 2026.07.25
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@nczitzk
Introduction: 经济观察报快讯
Address: rssust://eeo_kuaixun
Example: rssust://eeo_kuaixun
Parameter:
无参数
Environment Variables: no

Router-name: gamersky_news

Commit time: 2026.09.13
Cookies?: no
Author: AI制作 / huiinyg-rusting审核
Introduction: 游民星空(gamersky)游戏资讯列表(服务端渲染 HTML,无官方 RSS,robots.txt 仅禁 /indexbeta/)
Address: rssust://gamersky_news
Example: rssust://gamersky_news
robots.txt: www.gamersky.com robots.txt 仅禁止 /indexbeta/,资讯路径允许
Parameter: no
Environment Variables: no

Router-name: gelonghui_home

Commit time: 2026.07.22
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@TonyRL
Introduction: 格隆汇首页,支持分类(推荐/股票/基金/新股/研报)
Address: rssust://gelonghui_home
Example: rssust://gelonghui_home
Parameter:
tag: 分类 (默认 web_home_page)
Environment Variables: no

Router-name: github_advisor

Commit time: 2026.08.06
Cookies?: no
Author: huiinyg-rusting
Introduction: GitHub Advisory Database Security Advisories (REST API)
Address: rssust://github_advisor
Example: rssust://github_advisor?type=reviewed&ecosystem=npm
Parameter:
type (optional, reviewed=reviewed unreviewed=unreviewed, default reviewed)
ecosystem (optional, composer/go/maven/npm/nuget/pip/pub/rubygems/rust/erlang/actions/swift, default all)
limit (optional, max 50, default 20)
Environment Variables: GITHUB_TOKEN

Router-name: github_branch

Commit time: 2026.08.11
Cookies?: no
Author: AI转写 / huiinyg-rusting审核 - 来源于RSShub@max-arnold
Introduction: GitHub 仓库分支列表
Address: rssust://github_branch
Example: rssust://github_branch?owner=nodejs&repo=node
Parameter:

  1. owner
    Type of parameter: string
    Default value: 无
    Meaning: 仓库所有者
  2. repo
    Type of parameter: string
    Default value: 无
    Meaning: 仓库名称
  3. limit
    Type of parameter: number
    Default value: 30
    Meaning: 条数,最大100 Environment Variables: GITHUB_TOKEN

Router-name: github_commits

Commit time: 2026.08.04
Cookies?: no
Author: huiinyg-rusting
Introduction: GitHub repository recent commits on default branch via GraphQL API
Address: rssust://github_commits
Example: rssust://github_commits?owner=rust-lang&repo=rust
Parameter:
owner (required, repository owner)
repo (required, repository name)
limit (optional, max 50, default 10)
Environment Variables: GITHUB_TOKEN

Router-name: github_contributors

Commit time: 2026.08.11
Cookies?: no
Author: AI转写 / huiinyg-rusting审核 - 来源于RSShub@zoenglinghou
Introduction: GitHub 仓库贡献者列表
Address: rssust://github_contributors
Example: rssust://github_contributors?owner=rust-lang&repo=rust
Parameter:

  1. owner
    Type of parameter: string
    Default value: 无
    Meaning: 仓库所有者 (必填)
  2. repo
    Type of parameter: string
    Default value: 无
    Meaning: 仓库名 (必填)
  3. order
    Type of parameter: string
    Default value: desc
    Meaning: 排序, desc=贡献数降序 / asc=升序
  4. anon
    Type of parameter: boolean
    Default value: false
    Meaning: 是否包含匿名贡献者
  5. limit
    Type of parameter: number
    Default value: 30
    Meaning: 条数, 最大 100 Environment Variables: GITHUB_TOKEN

Router-name: github_discussions

Commit time: 2026.08.11
Cookies?: no
Author: AI转写 / huiinyg-rusting审核 - 来源于RSShub@waynzh
Introduction: GitHub 仓库 Discussion 讨论列表 (GraphQL)
Address: rssust://github_discussions
Example: rssust://github_discussions?owner=vercel&repo=next.js
Parameter:

  1. owner
    Type of parameter: string
    Default value: 无
    Meaning: 仓库所有者 (必填)
  2. repo
    Type of parameter: string
    Default value: 无
    Meaning: 仓库名 (必填)
  3. state
    Type of parameter: string
    Default value: open
    Meaning: 状态, open/closed/answered/unanswered/locked/unlocked/all
  4. category
    Type of parameter: string
    Default value: 无
    Meaning: 讨论分类名 (可选)
  5. limit
    Type of parameter: number
    Default value: 20
    Meaning: 条数, 最大 100 Environment Variables: GITHUB_TOKEN

Router-name: github_followers

Commit time: 2026.08.04
Cookies?: no
Author: huiinyg-rusting
Introduction: GitHub user followers query via GraphQL API
Address: rssust://github_followers
Example: rssust://github_followers?username=torvalds
Parameter:
username (required, GitHub login)
Environment Variables: GITHUB_TOKEN

Router-name: github_gist

Commit time: 2026.08.11
Cookies?: no
Author: AI转写 / huiinyg-rusting审核 - 来源于RSShub@TonyRL
Introduction: 用户公开/私密 Gist 列表
Address: rssust://github_gist
Example: rssust://github_gist?username=octocat
Parameter:

  1. username
    Type of parameter: string
    Default value: 无
    Meaning: GitHub 用户名 (必填)
  2. limit
    Type of parameter: number
    Default value: 20
    Meaning: 条数, 最大 100 Environment Variables: GITHUB_TOKEN

Router-name: github_issue

Commit time: 2026.08.11
Cookies?: no
Author: AI转写 / huiinyg-rusting审核 - 来源于RSShub@HenryQW、AndreyMZ
Introduction: GitHub 仓库 Issue 列表
Address: rssust://github_issue
Example: rssust://github_issue?owner=nodejs&repo=node
Parameter:

  1. owner
    Type of parameter: string
    Default value: 无
    Meaning: 仓库所有者
  2. repo
    Type of parameter: string
    Default value: 无
    Meaning: 仓库名称
  3. state
    Type of parameter: string
    Default value: open
    Meaning: issue 状态,open/closed/all
  4. limit
    Type of parameter: number
    Default value: 20
    Meaning: 条数,最大50 Environment Variables: GITHUB_TOKEN

Router-name: github_issue_comments

Commit time: 2026.08.04
Cookies?: no
Author: huiinyg-rusting
Introduction: GitHub repository recent Issue / Pull Request comments via GraphQL API
Address: rssust://github_issue_comments
Example: rssust://github_issue_comments?owner=facebook&repo=react
Parameter:
owner (required, repository owner)
repo (required, repository name)
limit (optional, max 50, default 20, split between issues & PRs, 2 latest comments each)
Environment Variables: GITHUB_TOKEN

Router-name: github_pull

Commit time: 2026.08.11
Cookies?: no
Author: AI转写 / huiinyg-rusting审核 - 来源于RSShub@hashman、TonyRL
Introduction: GitHub 仓库 Pull Request 列表
Address: rssust://github_pull
Example: rssust://github_pull?owner=nodejs&repo=node
Parameter:

  1. owner
    Type of parameter: string
    Default value: 无
    Meaning: 仓库所有者
  2. repo
    Type of parameter: string
    Default value: 无
    Meaning: 仓库名称
  3. state
    Type of parameter: string
    Default value: open
    Meaning: PR 状态,open/closed/all
  4. limit
    Type of parameter: number
    Default value: 20
    Meaning: 条数,最大50 Environment Variables: GITHUB_TOKEN

Router-name: github_release

Commit time: 2026.08.11
Cookies?: no
Author: AI转写 / huiinyg-rusting审核 - 原创设计(参照官方API/文档)
Introduction: GitHub 仓库 Release 列表
Address: rssust://github_release
Example: rssust://github_release?owner=nodejs&repo=node
Parameter:

  1. owner
    Type of parameter: string
    Default value: 无
    Meaning: 仓库所有者
  2. repo
    Type of parameter: string
    Default value: 无
    Meaning: 仓库名称
  3. limit
    Type of parameter: number
    Default value: 20
    Meaning: 条数,最大50 Environment Variables: GITHUB_TOKEN

Router-name: github_repo_events

Commit time: 2026.08.11
Cookies?: no
Author: AI转写 / huiinyg-rusting审核 - 来源于RSShub@mslxl
Introduction: GitHub 仓库事件流 (push/issue/PR/release/star 等)
Address: rssust://github_repo_events
Example: rssust://github_repo_events?owner=octocat&repo=Hello-World
Parameter:

  1. owner
    Type of parameter: string
    Default value: 无
    Meaning: 仓库所有者 (必填)
  2. repo
    Type of parameter: string
    Default value: 无
    Meaning: 仓库名 (必填)
  3. types
    Type of parameter: string
    Default value: all
    Meaning: 事件类型过滤, 逗号分隔 (create/delete/fork/issue/issuecomm/member/pr/prcomm/prrev/public/push/release/star/wiki/cmcomm/discussion)
  4. limit
    Type of parameter: number
    Default value: 30
    Meaning: 条数, 最大 100 Environment Variables: GITHUB_TOKEN

Router-name: github_repo_stargazers

Commit time: 2026.08.11
Cookies?: no
Author: AI转写 / huiinyg-rusting审核 - 原创设计(参照官方API/文档)
Introduction: GitHub 仓库加星用户时间线(含 Star 时间)
Address: rssust://github_repo_stargazers
Example: rssust://github_repo_stargazers?owner=rust-lang&repo=rust
Parameter:

  1. owner
    Type of parameter: string
    Default value: 无
    Meaning: 仓库所有者 (必填)
  2. repo
    Type of parameter: string
    Default value: 无
    Meaning: 仓库名 (必填)
  3. limit
    Type of parameter: number
    Default value: 30
    Meaning: 条数, 最大 100 Environment Variables: GITHUB_TOKEN

Router-name: github_search

Commit time: 2026.08.11
Cookies?: no
Author: AI转写 / huiinyg-rusting审核 - 来源于RSShub@LogicJake
Introduction: GitHub 仓库搜索
Address: rssust://github_search
Example: rssust://github_search?q=rust
Parameter:

  1. q
    Type of parameter: string
    Default value: 无
    Meaning: 搜索关键词(必填)
  2. sort
    Type of parameter: string
    Default value: stars
    Meaning: 排序方式,stars/forks/updated/help-wanted-issues/best-match
  3. order
    Type of parameter: string
    Default value: desc
    Meaning: 排序方向,asc/desc
  4. limit
    Type of parameter: number
    Default value: 20
    Meaning: 条数,最大50 Environment Variables: GITHUB_TOKEN

Router-name: github_starred

Commit time: 2026.08.11
Cookies?: no
Author: AI转写 / huiinyg-rusting审核 - 来源于RSShub@LanceZhu
Introduction: GitHub 用户收藏的仓库列表
Address: rssust://github_starred
Example: rssust://github_starred?username=torvalds
Parameter:

  1. username
    Type of parameter: string
    Default value: 无
    Meaning: GitHub 用户名
  2. limit
    Type of parameter: number
    Default value: 20
    Meaning: 条数,最大100 Environment Variables: GITHUB_TOKEN

Router-name: github_stars

Commit time: 2026.08.04
Cookies?: no
Author: huiinyg-rusting
Introduction: GitHub single repository star count via GraphQL API
Address: rssust://github_stars
Example: rssust://github_stars?owner=torvalds&repo=linux
Parameter:
owner (required, repository owner)
repo (required, repository name)
Environment Variables: GITHUB_TOKEN

Router-name: github_tag

Commit time: 2026.08.11
Cookies?: no
Author: AI转写 / huiinyg-rusting审核 - 原创设计(参照官方API/文档)
Introduction: GitHub 仓库 Tag 列表
Address: rssust://github_tag
Example: rssust://github_tag?owner=nodejs&repo=node
Parameter:

  1. owner
    Type of parameter: string
    Default value: 无
    Meaning: 仓库所有者
  2. repo
    Type of parameter: string
    Default value: 无
    Meaning: 仓库名称
  3. limit
    Type of parameter: number
    Default value: 30
    Meaning: 条数,最大100 Environment Variables: GITHUB_TOKEN

Router-name: github_topic

Commit time: 2026.08.11
Cookies?: no
Author: AI转写 / huiinyg-rusting审核 - 来源于RSShub@queensferryme
Introduction: GitHub Topics 话题下的仓库列表(抓取网页)
Address: rssust://github_topic
Example: rssust://github_topic?name=framework
Parameter:

  1. name
    Type of parameter: string
    Default value: 无
    Meaning: 话题名(必填),如 framework
  2. qs
    Type of parameter: string
    Default value: 空
    Meaning: 查询串,如 l=php&o=desc&s=stars
  3. limit
    Type of parameter: number
    Default value: 25
    Meaning: 条数,最大25 Environment Variables: GITHUB_TOKEN

Router-name: github_trending

Commit time: 2026.08.08
Cookies?: no
Author: AI-converted / huiinyg-reviewed - based on RSSHub
Introduction: GitHub Trending repositories (no official RSS, scraped)
Address: rssust://github_trending
Example: rssust://github_trending
Parameter:
since (optional, daily/weekly/monthly, default daily)
limit (optional, max 25, default 25)
Note:
robots.txt allows /trending. Returns repo name, description, language and stars-today. Environment Variables: GITHUB_TOKEN

Router-name: github_user_events

Commit time: 2026.08.11
Cookies?: no
Author: AI转写 / huiinyg-rusting审核 - 来源于RSShub@mslxl
Introduction: GitHub 用户最近公开动态(events)
Address: rssust://github_user_events
Example: rssust://github_user_events?username=torvalds
Parameter:

  1. username
    Type of parameter: string
    Default value: 无
    Meaning: GitHub 用户名
  2. limit
    Type of parameter: number
    Default value: 30
    Meaning: 条数,最大100 Environment Variables: GITHUB_TOKEN

Router-name: github_user_repos

Commit time: 2026.08.11
Cookies?: no
Author: AI转写 / huiinyg-rusting审核 - 来源于RSShub@DIYgod
Introduction: GitHub 用户的仓库列表
Address: rssust://github_user_repos
Example: rssust://github_user_repos?username=torvalds
Parameter:

  1. username
    Type of parameter: string
    Default value: 无
    Meaning: GitHub 用户名
  2. type
    Type of parameter: string
    Default value: owner
    Meaning: 仓库类型,all/owner/member
  3. limit
    Type of parameter: number
    Default value: 20
    Meaning: 条数,最大100 Environment Variables: GITHUB_TOKEN

Router-name: guancha_headline

Commit time: 2026.07.21
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@nczitzk
Introduction: 观察者网头条
Address: rssust://guancha_headline
Example: rssust://guancha_headline
Parameter:
无参数
Environment Variables: no

Router-name: guanhai

Commit time: 2026.07.25
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@TonyRL
Introduction: 观海新闻首页推荐
Address: rssust://guanhai
Example: rssust://guanhai
Parameter:
无参数
Environment Variables: no

Router-name: guokr_scientific

Commit time: 2026.08.04
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub
Introduction: 果壳网 科学人 文章
Address: rssust://guokr_scientific
Example: rssust://guokr_scientific
Parameter:
limit(可选,最大 50,默认 20) Environment Variables: no

Router-name: hackernews

Commit time: 2026.08.06
Cookies?: no
Author: AI-converted / huiinyg-reviewed - based on RSSHub
Introduction: Hacker News Stories (official Algolia API)
Address: rssust://hackernews
Example: rssust://hackernews
Parameter:
section (optional, index/newest/ask/show/jobs/best/over, default index)
type (optional, sources=story links comments=with comment summary, default sources)
value (optional, section=over for min points threshold default 100; others can append author=xxx)
limit (optional, max 50, default 30)
Rate limit:
Recommend config “/hackernews” = 30 in config.toml routes.rate_limit (respect robots Crawl-delay: 30) Environment Variables: no

Router-name: ifeng_news

Commit time: 2026.07.22
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@nczitzk
Introduction: 凤凰网资讯
Address: rssust://ifeng_news
Example: rssust://ifeng_news
Parameter:
无参数
Environment Variables: no

Router-name: ithome_ranking

Commit time: 2026.07.21
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@immmortal, luyuhuang
Introduction: IT之家热榜
Address: rssust://ithome_ranking
Example: rssust://ithome_ranking?type=24h
Parameter:

  1. type
    Type of parameter: string
    Default value: 24h
    Meaning: 24h(24小时最热), 7days(7天最热), monthly(月榜)
    Environment Variables: no

Router-name: jianshu_home

Commit time: 2026.07.21
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@DIYgod, HenryQW, JimenezLi
Introduction: 简书首页
Address: rssust://jianshu_home
Example: rssust://jianshu_home
Parameter:
无参数
Environment Variables: no

Router-name: jiemian_news

Commit time: 2026.09.13
Cookies?: no
Author: AI制作 / huiinyg-rusting审核
Introduction: 界面新闻(jiemian)要闻列表(服务端渲染 HTML,无官方 RSS,robots.txt 全允许)
Address: rssust://jiemian_news
Example: rssust://jiemian_news
robots.txt: www.jiemian.com robots.txt 仅禁止 /Con*/,首页允许
Parameter: no
Environment Variables: no

Router-name: juejin_pins

Commit time: 2026.07.29
Cookies?: no
Author: AI转写 / huiinyg审核
Introduction: 掘金沸点
Address: rssust://juejin_pins
Example: rssust://juejin_pins?type=hot
Parameter:

  1. type
    Type of parameter: string
    Default value: recommend
    Meaning: 沸点分类:recommend(推荐), hot(热门),或话题ID(如 6824710203301167112=上班摸鱼, 6819970850532360206=内推招聘, 6824710202487472141=一图胜千言, 6824710202562969614=今天学到了, 6824710202378436621=每天一道算法题, 6824710202000932877=开发工具推荐, 6824710203112423437=树洞一下)
    Environment Variables: no

Router-name: juejin_trending

Commit time: 2026.07.29
Cookies?: no
Author: AI转写 / huiinyg审核
Introduction: 掘金热门文章
Address: rssust://juejin_trending
Example: rssust://juejin_trending
Parameter:

  1. category
    Type of parameter: string
    Default value: all
    Meaning: 分类:all(全部) 或分类URL名(如 frontend, backend, android 等)
  2. type
    Type of parameter: string
    Default value: weekly
    Meaning: 时间范围:weekly(本周), monthly(本月), historical(历史)
    Environment Variables: no

Router-name: kali_blog

Commit time: 2026.08.18
Cookies?: no
Author: AI转写 / huiinyg审核
Introduction: Kali Linux 官方博客(blog.kali.org 的更新,含发布日志与工具介绍)
Address: rssust://kali_blog
Example: rssust://kali_blog
robots.txt: 允许抓取(Disallow: 仅限个别归档页面)
Parameter:

  1. limit
    Type of parameter: number
    Default value: 20
    Meaning: 抓取条数,最大50 Environment Variables: no

Router-name: leiphone_newsflash

Commit time: 2026.07.22
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub
Introduction: 雷锋网业界资讯
Address: rssust://leiphone_newsflash
Example: rssust://leiphone_newsflash
Parameter:
无参数
Environment Variables: no

Router-name: lwn

Commit time: 2026.08.18
Cookies?: no
Author: AI转写 / huiinyg审核
Introduction: LWN.net(Linux 内核与技术新闻)官方 RSS 转接
Address: rssust://lwn
Example: rssust://lwn
robots.txt: 允许抓取(User-agent: *,仅禁止 /Search 与 /ml)
Parameter:

  1. feed
    Type of parameter: string
    Default value: rss
    Meaning: LWN 官方 feed 名,如 rss(主站), rss2, c(每周社论), rss/weekly 等 Environment Variables: no

Router-name: mittrchina

Commit time: 2026.08.04
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub
Introduction: MIT Technology Review 麻省理工科技评论中文站
Address: rssust://mittrchina
Example: rssust://mittrchina
Parameter:
type(可选,index=首页资讯 hot=本周热榜 breaking=快讯 video=视频,默认 index)
limit(可选,最大 30,默认 10) Environment Variables: no

Router-name: moe_news

Commit time: 2026.08.31
Cookies?: no
Author: AI制作 / huiinyg-rusting审核
Introduction: 教育部司局要闻列表(服务端渲染 HTML,无官方 RSS)
Address: rssust://moe_news
Example: rssust://moe_news
robots.txt: www.moe.gov.cn 无 robots.txt,视为允许
Parameter: no
Environment Variables: no

Router-name: mydrivers_news

Commit time: 2026.09.13
Cookies?: no
Author: AI制作 / huiinyg-rusting审核
Introduction: 快科技(mydrivers)今日资讯列表(服务端渲染 HTML,无官方 RSS,robots.txt 全允许)
Address: rssust://mydrivers_news
Example: rssust://mydrivers_news
robots.txt: www.mydrivers.com robots.txt 不禁止抓取
Parameter: no
Environment Variables: no

Router-name: nasa_apod

Commit time: 2026.08.30
Cookies?: no
Author: AI制作 / huiinyg-rusting审核
Introduction: NASA 每日天文一图(APOD),官方公开 API,无官方 RSS
Address: rssust://nasa_apod
Example: rssust://nasa_apod
robots.txt: api.nasa.gov 无 robots.txt,允许抓取;DEMO_KEY 限流约 30 次/小时 Parameter:

  1. count
    Type of parameter: int
    Default value: 5
    Meaning: 返回的图片条目数(最近若干天),范围 1-30
    Environment Variables: no

Router-name: nbd_news

Commit time: 2026.09.13
Cookies?: no
Author: AI制作 / huiinyg-rusting审核
Introduction: 每经网(nbd)今日要闻列表(服务端渲染 HTML,无官方 RSS,robots.txt 全允许)
Address: rssust://nbd_news
Example: rssust://nbd_news
robots.txt: www.nbd.com.cn robots.txt 不禁止抓取
Parameter: no
Environment Variables: no

Router-name: netease_today

Commit time: 2026.07.20
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@nczitzk
Introduction: 网易新闻今日关注
Address: rssust://netease_today
Example: rssust://netease_today
Parameter:
无参数
Environment Variables: no

Router-name: nmc_alarm

Commit time: 2026.07.31
Cookies?: no
Author: AI转写 / huiinyg审核 - 自行开发
Introduction: 中央气象台预警信号
Address: rssust://nmc_alarm
Example: rssust://nmc_alarm?type=暴雨&level=黄色&province=河北
Parameter:

  1. type
    Type of parameter: string
    Default value: null
    Meaning: 预警类型:台风/暴雨/暴雪/寒潮/大风/沙尘暴/高温/干旱/雷电/冰雹/霜冻/大雾/道路结冰
  2. level
    Type of parameter: string
    Default value: null
    Meaning: 预警等级:蓝色/黄色/橙色/红色
  3. province
    Type of parameter: string
    Default value: null
    Meaning: 省级区域,支持简称(如“河北“)或全称(如“河北省“)
  4. date
    Type of parameter: string
    Default value: null
    Meaning: 指定日期(YYYY-MM-DD),只返回该日发布的预警
  5. limit
    Type of parameter: number
    Default value: 50
    Meaning: 条目数量上限,最大 200
    Environment Variables: no

Router-name: openai_chatgpt_atlas_release

Commit time: 2026.08.06
Cookies?: no
平台限制: 抓取 help.openai.com 需 curl-impersonate(chrome110 TLS 指纹)。Windows x86_64 无预编译二进制 → 需从源码编译 curl-impersonate 或使用 WSL;否则本路由 500(无降级)。参考 openai_common.rs::fetch_release_notes
Author: AI-converted / huiinyg-reviewed - based on RSSHub
Introduction: ChatGPT Atlas Release Notes (help.openai.com single page scrape)
Address: rssust://openai_chatgpt_atlas_release
Example: rssust://openai_chatgpt_atlas_release
Parameter:
limit (optional, max 30, default 10) Environment Variables: no

Router-name: openai_chatgpt_release

Commit time: 2026.08.06
Cookies?: no
平台限制: 抓取 help.openai.com 需 curl-impersonate(chrome110 TLS 指纹)。Windows x86_64 无预编译二进制 → 需从源码编译 curl-impersonate 或使用 WSL;否则本路由 500(无降级)。参考 openai_common.rs::fetch_release_notes
Author: AI-converted / huiinyg-reviewed - based on RSSHub
Introduction: ChatGPT Release Notes (help.openai.com single page scrape)
Address: rssust://openai_chatgpt_release
Example: rssust://openai_chatgpt_release
Parameter:
limit (optional, max 30, default 10) Environment Variables: no

Router-name: openai_news

Commit time: 2026.08.06
Cookies?: no
平台限制: 文章详情抓取需 curl-impersonate(chrome110 TLS 指纹)。Windows x86_64 无预编译二进制 → 需从源码编译或使用 WSL;此路由失败时降级为 RSS 摘要(不 500)。参考 openai_common.rs::fetch_article_details
Author: AI-converted / huiinyg-reviewed - based on RSSHub
Introduction: OpenAI Official News (rss.xml + full article content)
Address: rssust://openai_news
Example: rssust://openai_news
Parameter:
limit (optional, max 30, default 10) Environment Variables: no

Router-name: openai_research

Commit time: 2026.08.06
Cookies?: no
平台限制: 文章详情抓取需 curl-impersonate(chrome110 TLS 指纹)。Windows x86_64 无预编译二进制 → 需从源码编译或使用 WSL;此路由失败时降级为 RSS 摘要(不 500)。参考 openai_common.rs::fetch_article_details
Author: AI-converted / huiinyg-reviewed - based on RSSHub
Introduction: OpenAI Research Articles (filtered from official RSS by category=Research)
Address: rssust://openai_research
Example: rssust://openai_research
Parameter:
limit (optional, max 30, default 10) Environment Variables: no

Router-name: pingwest_news

Commit time: 2026.08.08
Cookies?: no
Author: AI-converted / huiinyg-reviewed - based on RSSHub
Introduction: 品玩 PingWest 首页精选资讯(无官方 RSS,抓取首页静态区块)
Address: rssust://pingwest_news
Example: rssust://pingwest_news
Parameter:
limit (optional, max 20, default 14)
Note:
robots.txt 允许抓取(仅禁 /search、/api-error-file、/mpview 等路径)。首页 headline / hot-recommend / 精选区块为服务端渲染,可抓取标题、作者与日期。 Environment Variables: no

Router-name: rail12306_news

Commit time: 2026.08.04
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub
Introduction: 12306 最新动态公告
Address: rssust://rail12306_news
Example: rssust://rail12306_news
Parameter:
limit(可选,最大 50,默认 20) Environment Variables: no

Router-name: rail12306_ticket

Commit time: 2026.08.04
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub
Introduction: 12306 火车票余票查询
Address: rssust://rail12306_ticket
Example: rssust://rail12306_ticket
Parameter:
date(必填,YYYY-MM-DD)
from(必填,出发站名,如“北京“)
to(必填,到达站名,如“上海“) Environment Variables: no

Router-name: scientificamerican_news

Commit time: 2026.08.02
Cookies?: no
Author: huiinyg
Introduction: Scientific American - Science & Technology News (no official RSS)
Address: rssust://scientificamerican_news
Example: rssust://scientificamerican_news
Parameter:
(No parameters) Environment Variables: no

Router-name: sina_finance

Commit time: 2026.08.31
Cookies?: no
Author: AI制作 / huiinyg-rusting审核
Introduction: 新浪财经 7×24 直播快讯(公开 JSON API,无官方 RSS)
Address: rssust://sina_finance
Example: rssust://sina_finance
robots.txt: 明确允许(sina.com.cn 的 robots 为 User-agent: * / Allow: /;zhibo.sina.com.cn 无 robots.txt)
Parameter:

  1. count
    Type of parameter: int
    Default value: 20
    Meaning: 返回快讯条数,范围 1-50
    Environment Variables: no

Router-name: smithsonianmag_news

Commit time: 2026.08.01
Cookies?: no
Author: huiinyg
Introduction: Smithsonian Magazine - Science, History & Culture (official RSS returns 403)
Address: rssust://smithsonianmag_news
Example: rssust://smithsonianmag_news
Parameter:
(No parameters) Environment Variables: no

Router-name: solidot

Commit time: 2026.07.21
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@sgqy, hang333, TonyRL
Introduction: 奇客的资讯,重要的东西
Address: rssust://solidot
Example: rssust://solidot
Parameter:

  1. type
    Type of parameter: string
    Default value: www
    Meaning: 分类名,如 www(主站), science(科学), mobile(移动), linux, bsd 等
    Environment Variables: no

Router-name: stcn_article_list

Commit time: 2026.07.22
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@nczitzk
Introduction: 证券时报网文章列表,按分类(要闻/股市/公司/基金/金融/评论/产经/科创板/新三板/ESG/滚动)
Address: rssust://stcn_article_list
Example: rssust://stcn_article_list
Parameter:
id: 分类 (默认 yw)
Environment Variables: no

Router-name: stcn_kx

Commit time: 2026.07.22
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@nczitzk
Introduction: 证券时报网快讯
Address: rssust://stcn_kx
Example: rssust://stcn_kx
Parameter:
无参数
Environment Variables: no

Router-name: stcn_rank

Commit time: 2026.07.22
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@nczitzk
Introduction: 证券时报网热榜(按分类)
Address: rssust://stcn_rank
Example: rssust://stcn_rank
Parameter:
id: 分类 (默认 yw)
Environment Variables: no

Router-name: thepaper_featured

Commit time: 2026.07.21
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@nczitzk
Introduction: 澎湃新闻首页头条推荐
Address: rssust://thepaper_featured
Example: rssust://thepaper_featured
Parameter:
无参数
Environment Variables: no

Router-name: tmtpost_new

Commit time: 2026.07.22
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@nczitzk
Introduction: 钛媒体最新文章
Address: rssust://tmtpost_new
Example: rssust://tmtpost_new
Parameter:
无参数
Environment Variables: no

Router-name: toutiao_hot

Commit time: 2026.08.31
Cookies?: no
Author: AI制作 / huiinyg-rusting审核
Introduction: 今日头条热榜(公开 JSON API,无官方 RSS)
Address: rssust://toutiao_hot
Example: rssust://toutiao_hot
robots.txt: 允许抓取;toutiao.com 的 robots 仅 Disallow /search、/item、/group、/m1-m8、/trending/ 等路径,本路由只请求 /hot-event/
Parameter:

  1. count
    Type of parameter: int
    Default value: 50
    Meaning: 返回热搜条目数,范围 1-50
    Environment Variables: no

Router-name: videocardz_news

Commit time: 2026.08.01
Cookies?: no
Author: huiinyg
Introduction: VideoCardz.com - Latest GPU & Hardware News (English tech site, no official RSS)
Address: rssust://videocardz_news
Example: rssust://videocardz_news
Parameter:
(No parameters) Environment Variables: no

Router-name: wallstreetcn_hot

Commit time: 2026.07.21
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@nczitzk
Introduction: 华尔街见闻最热文章
Address: rssust://wallstreetcn_hot
Example: rssust://wallstreetcn_hot?period=day
Parameter:

  1. period
    Type of parameter: string
    Default value: day
    Meaning: 时间范围,day(当日) 或 week(当周)
    Environment Variables: no

Router-name: yicai_headline

Commit time: 2026.07.22
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@nczitzk
Introduction: 第一财经头条
Address: rssust://yicai_headline
Example: rssust://yicai_headline
Parameter:
无参数
Environment Variables: no

Router-name: yicai_latest

Commit time: 2026.07.22
Cookies?: no
Author: AI转写 / huiinyg审核 - 来源于RSShub@nczitzk
Introduction: 第一财经最新文章
Address: rssust://yicai_latest
Example: rssust://yicai_latest
Parameter:
无参数
Environment Variables: no

Router-name: zhihu_daily

Commit time: 2026.08.30
Cookies?: no
Author: AI制作 / huiinyg-rusting审核
Introduction: 知乎日报(官方公开 API,无官方 RSS)
Address: rssust://zhihu_daily
Example: rssust://zhihu_daily
robots.txt: zhihu.com 的 robots.txt 无通用禁止,允许抓取
Parameter:

  1. date
    Type of parameter: string
    Default value: 无(返回最新一期)
    Meaning: 日期 YYYYMMDD,返回该日期之前一期的内容
    Environment Variables: no

Router-name: zhihu_hot

Commit time: 2026.07.16
Cookies?: no
Author: huiinyg-rusting
Introduction: 知乎热榜
Address: rssust://zhihu_hot
Example: rssust://zhihu_hot
Parameter: no
Environment Variables: no