diff --git a/lib/routes/141jav/index.tsx b/lib/routes/141jav/index.tsx index 03818ae3f..87517a609 100644 --- a/lib/routes/141jav/index.tsx +++ b/lib/routes/141jav/index.tsx @@ -2,13 +2,13 @@ import { load } from 'cheerio'; import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; -import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/:type/:keyword{.+}?', categories: ['multimedia'], + example: '/141jav/popular/30', name: '通用', maintainers: ['cgkings', 'nczitzk'], parameters: { type: '类型,可查看下表的类型说明', keyword: '关键词,可查看下表的关键词说明' }, @@ -65,11 +65,6 @@ async function handler(ctx) { const $ = load(response.data); - if (getSubPath(ctx) === '/') { - ctx.set('redirect', `/141jav${$('.overview').first().attr('href')}`); - return; - } - const items = $('.columns') .toArray() .map((item) => { diff --git a/lib/routes/141ppv/index.tsx b/lib/routes/141ppv/index.tsx index 4cd480a53..05172e45a 100644 --- a/lib/routes/141ppv/index.tsx +++ b/lib/routes/141ppv/index.tsx @@ -2,13 +2,13 @@ import { load } from 'cheerio'; import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; -import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/:type/:keyword{.+}?', categories: ['multimedia'], + example: '/141ppv/popular/30', name: '通用', maintainers: ['cgkings', 'nczitzk'], parameters: { type: '类型,可查看下表的类型说明', keyword: '关键词,可查看下表的关键词说明' }, @@ -65,11 +65,6 @@ async function handler(ctx) { const $ = load(response.data); - if (getSubPath(ctx) === '/') { - ctx.set('redirect', `/141ppv${$('.overview').first().attr('href')}`); - return; - } - const items = $('.columns') .toArray() .map((item) => { diff --git a/lib/routes/163/music/userevents.tsx b/lib/routes/163/music/userevents.tsx index 8efb40e08..379c1f09e 100644 --- a/lib/routes/163/music/userevents.tsx +++ b/lib/routes/163/music/userevents.tsx @@ -23,6 +23,10 @@ const renderDescription = ({ description, pics }) => { export const route: Route = { path: '/music/user/events/:id', categories: ['multimedia'], + example: '/163/music/user/events/585804522', + parameters: { + id: '用户 uid, 可在用户主页 URL 中找到', + }, radar: [ { source: ['music.163.com/user/event'], diff --git a/lib/routes/1point3acres/offer.tsx b/lib/routes/1point3acres/offer.tsx index a7f1797c2..03542881a 100644 --- a/lib/routes/1point3acres/offer.tsx +++ b/lib/routes/1point3acres/offer.tsx @@ -24,7 +24,7 @@ export const route: Route = { }, ], name: '录取结果', - maintainers: ['EthanWng97'], + maintainers: ['IvanWng97'], handler, url: 'offer.1point3acres.com/', description: `::: tip 三个 id 获取方式 diff --git a/lib/routes/1point3acres/thread.ts b/lib/routes/1point3acres/thread.ts index 8bf500569..956478978 100644 --- a/lib/routes/1point3acres/thread.ts +++ b/lib/routes/1point3acres/thread.ts @@ -8,7 +8,7 @@ export const route: Route = { parameters: { type: '帖子分类, 见下表,默认为 hot,即热门帖子', order: '排序方式,见下表,默认为空,即最新回复' }, name: '帖子', categories: ['bbs'], - maintainers: ['EthanWng97', 'DIYgod', 'nczitzk'], + maintainers: ['IvanWng97', 'DIYgod', 'nczitzk'], handler, url: 'instant.1point3acres.com/', description: `分类 diff --git a/lib/routes/2cycd/index.ts b/lib/routes/2cycd/index.ts index 4b52e7599..453587ef9 100644 --- a/lib/routes/2cycd/index.ts +++ b/lib/routes/2cycd/index.ts @@ -11,8 +11,22 @@ import timezone from '@/utils/timezone'; export const route: Route = { path: '/:fid/:sort?', - name: 'Unknown', + categories: ['bbs'], + example: '/2cycd/43/dateline', + parameters: { fid: '板块', sort: '排序' }, + name: '板块', maintainers: ['shelken'], + description: `板块(更多板块请自行 [查看](http://www.2cycd.com)) + +| 音乐下载(默认) | 动漫下载 | 游戏下载 | +| ---------------- | -------- | -------- | +| 43 | 53 | 42 | + +排序 + +| 发布时间排序(默认) | 回复/查看 | 查看 | +| -------------------- | ---------- | ----- | +| dateline | replies | views |`, handler, }; diff --git a/lib/routes/3dmgame/game.ts b/lib/routes/3dmgame/game.ts index c6ebcd845..f8996f4aa 100644 --- a/lib/routes/3dmgame/game.ts +++ b/lib/routes/3dmgame/game.ts @@ -8,6 +8,8 @@ import { parseArticle } from './utils'; export const route: Route = { path: '/games/:name/:type?', + example: '/3dmgame/games/detroitbecomehuman/news', + parameters: { name: '游戏名字,可以在专题页的 url 中找到', type: '资讯类型,见下表,默认为 `news`' }, radar: [ { source: ['3dmgame.com/games/:name/:type'], @@ -17,6 +19,9 @@ export const route: Route = { categories: ['game'], maintainers: ['sinchang', 'jacky2001114', 'HenryQW', 'lyqluis'], handler, + description: `| 新闻 | 攻略 | 资源 | +| ---- | ---- | -------- | +| news | gl | resource |`, }; async function handler(ctx) { diff --git a/lib/routes/4gamers/category.ts b/lib/routes/4gamers/category.ts index da6c33f73..f64867b84 100644 --- a/lib/routes/4gamers/category.ts +++ b/lib/routes/4gamers/category.ts @@ -5,25 +5,28 @@ import got from '@/utils/got'; import { getCategories, parseItem, parseList } from './utils'; export const route: Route = { - path: ['/', '/category/:category'], + path: '/category/:category', + categories: ['game'], + example: '/4gamers/category/352', + parameters: { category: '分类 ID,可从分类 URL 中找到' }, radar: [ { - source: ['www.4gamers.com.tw/news', 'www.4gamers.com.tw/'], - target: '', + source: ['www.4gamers.com.tw/news/category/:category/:categoryName'], + target: '/category/:category', }, ], - name: 'Unknown', + name: '分类', maintainers: ['TonyRL'], handler, url: 'www.4gamers.com.tw/news', }; -async function handler(ctx) { +export async function handler(ctx) { const category = ctx.req.param('category'); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 25; const isLatest = !category; - const { data: response } = await got(`https://www.4gamers.com.tw/site/api/news/${isLatest ? 'latest' : `by-category/${category}`}`, { + const { data: response } = await got(`https://www.4gamers.com.tw/site/api/news/${isLatest ? 'latest' : `of-category/${category}`}`, { searchParams: { nextStart: 0, pageSize: limit, diff --git a/lib/routes/4gamers/index.ts b/lib/routes/4gamers/index.ts new file mode 100644 index 000000000..9a55d4a12 --- /dev/null +++ b/lib/routes/4gamers/index.ts @@ -0,0 +1,19 @@ +import type { Route } from '@/types'; + +import { handler } from './category'; + +export const route: Route = { + path: '/', + categories: ['game'], + example: '/4gamers', + radar: [ + { + source: ['www.4gamers.com.tw/news', 'www.4gamers.com.tw/'], + target: '/', + }, + ], + name: '最新消息', + maintainers: ['TonyRL'], + handler, + url: 'www.4gamers.com.tw/news', +}; diff --git a/lib/routes/50forum/zhuanjia.ts b/lib/routes/50forum/zhuanjia.ts index 4251b4c60..5cdf4c6df 100644 --- a/lib/routes/50forum/zhuanjia.ts +++ b/lib/routes/50forum/zhuanjia.ts @@ -8,6 +8,8 @@ import timezone from '@/utils/timezone'; export const route: Route = { path: '/', + categories: ['study'], + example: '/50forum', radar: [ { source: ['www.50forum.org.cn/portal/list/index.html?id=6'], @@ -18,7 +20,7 @@ export const route: Route = { target: '', }, ], - name: 'Unknown', + name: '专家文章', maintainers: ['sddiky'], handler, url: 'https://www.50forum.org.cn/portal/list/index.html?id=6', diff --git a/lib/routes/6park/news.ts b/lib/routes/6park/news.ts index c6d53cb59..2e6ffab35 100644 --- a/lib/routes/6park/news.ts +++ b/lib/routes/6park/news.ts @@ -8,6 +8,8 @@ import timezone from '@/utils/timezone'; export const route: Route = { path: '/news/:site?/:id?/:keyword?', + categories: ['new-media'], + example: '/6park/news', radar: [ { source: ['club.6parkbbs.com/:id/index.php', 'club.6parkbbs.com/'], @@ -17,11 +19,16 @@ export const route: Route = { name: '新闻栏目', maintainers: ['nczitzk', 'cscnk52'], parameters: { - site: '分站,可选newspark、local,默认为 newspark', - id: '栏目 id,可选,默认为空', - keyword: '关键词,可选,默认为空', + site: '分站,见下表,默认为 newspark', + id: '栏目 id', + keyword: '关键字', }, - description: `::: tip 提示 + description: `分站 + +| newspark | local | +| -------- | ----- | + +::: tip 提示 若订阅 [时政](https://www.6parknews.com/newspark/index.php?type=1),其网址为 ,其中 \`newspark\` 为分站,\`1\` 为栏目 id。 若订阅 [美国](https://local.6parknews.com/index.php?type_id=1),其网址为 ,其中 \`local\` 为分站,\`1\` 为栏目 id。 :::`, diff --git a/lib/routes/8world/index.ts b/lib/routes/8world/index.ts index d64bbbfa1..285d8d1bd 100644 --- a/lib/routes/8world/index.ts +++ b/lib/routes/8world/index.ts @@ -7,13 +7,26 @@ import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { - path: '*', - name: 'Unknown', - maintainers: [], + path: '/:category?', + categories: ['new-media'], + example: '/8world/realtime', + parameters: { category: '分类 id,见下表,默认为即时 REALTIME' }, + description: `| 分类 | id | +| ---------------------- | -------------- | +| 即时 REALTIME | realtime | +| 新加坡 SINGAPORE | singapore | +| 东南亚 SOUTH-EAST ASIA | southeast-asia | +| 中港台 GREATER CHINA | greater-china | +| 国际 WORLD | world | +| 财经 FINANCE | finance | +| 体育 SPORTS | sports | +| 社团 COMMUNITY | community |`, + name: '分类', + maintainers: ['nczitzk'], handler, }; -async function handler(ctx) { +export async function handler(ctx) { const path = getSubPath(ctx) === '/' ? '/realtime' : getSubPath(ctx); const rootUrl = 'https://www.8world.com'; diff --git a/lib/routes/8world/topic.ts b/lib/routes/8world/topic.ts new file mode 100644 index 000000000..dfd9b6ee2 --- /dev/null +++ b/lib/routes/8world/topic.ts @@ -0,0 +1,13 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/topic/:id', + categories: ['new-media'], + example: '/8world/topic/xianggang-3', + parameters: { id: '标签 id,可在对应标签页中找到' }, + name: '标签', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/9to5/subsite.ts b/lib/routes/9to5/subsite.ts index eefa7f300..5b8d492ab 100644 --- a/lib/routes/9to5/subsite.ts +++ b/lib/routes/9to5/subsite.ts @@ -7,9 +7,20 @@ import utils from './utils'; export const route: Route = { path: '/:subsite/:tag?', - name: 'Unknown', - maintainers: [], + categories: ['new-media'], + example: '/9to5/mac/aapl', + parameters: { + subsite: 'Subsite name', + tag: 'Tag name inside the url of the tag page', + }, + name: 'Sub-site', + maintainers: ['HenryQW'], handler, + description: `Supported sub-sites: + +| 9To5Mac | 9To5Google | 9To5Toys | +| ------- | ---------- | -------- | +| Mac | Google | Toys |`, }; async function handler(ctx) { diff --git a/lib/routes/aamacau/index.ts b/lib/routes/aamacau/index.ts index 86d330dff..5e039dcc6 100644 --- a/lib/routes/aamacau/index.ts +++ b/lib/routes/aamacau/index.ts @@ -24,7 +24,7 @@ export const route: Route = { }, ], name: '话题', - maintainers: [], + maintainers: ['nczitzk'], handler, url: 'aamacau.com/', description: `| 即時報道 | 每週專題 | 藝文爛鬼樓 | 論盡紙本 | 新聞事件 | 特別企劃 | diff --git a/lib/routes/abmedia/category.ts b/lib/routes/abmedia/category.ts index a99ea2b70..feb8c2d40 100644 --- a/lib/routes/abmedia/category.ts +++ b/lib/routes/abmedia/category.ts @@ -31,7 +31,7 @@ export const route: Route = { }, ], name: '类别', - maintainers: [], + maintainers: ['Fatpandac'], handler, description: `参数可以从链接中拿到,如: diff --git a/lib/routes/abmedia/index.ts b/lib/routes/abmedia/index.ts index 7513d30b6..a1558cd73 100644 --- a/lib/routes/abmedia/index.ts +++ b/lib/routes/abmedia/index.ts @@ -24,7 +24,7 @@ export const route: Route = { }, ], name: '首页最新新闻', - maintainers: [], + maintainers: ['Fatpandac'], handler, url: 'www.abmedia.io/', }; diff --git a/lib/routes/abskoop/index.ts b/lib/routes/abskoop/index.ts index 67fb0b6ae..e3f668b73 100644 --- a/lib/routes/abskoop/index.ts +++ b/lib/routes/abskoop/index.ts @@ -7,6 +7,8 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/', + categories: ['multimedia'], + example: '/abskoop', radar: [ { source: ['ahhhhfs.com/'], diff --git a/lib/routes/abskoop/nsfw.ts b/lib/routes/abskoop/nsfw.ts index 4cc07f67c..72c3f07d3 100644 --- a/lib/routes/abskoop/nsfw.ts +++ b/lib/routes/abskoop/nsfw.ts @@ -4,6 +4,8 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/nsfw', + categories: ['multimedia'], + example: '/abskoop/nsfw', radar: [ { source: ['ahhhhfs.com/'], diff --git a/lib/routes/acs/journal.tsx b/lib/routes/acs/journal.tsx index 24d1278bc..68b4b0a70 100644 --- a/lib/routes/acs/journal.tsx +++ b/lib/routes/acs/journal.tsx @@ -10,14 +10,23 @@ import playwright from '@/utils/playwright'; export const route: Route = { path: '/journal/:id', + categories: ['journal'], + example: '/acs/journal/jacsat', + parameters: { id: 'Journal id, can be found in URL' }, + features: { + supportScihub: true, + }, radar: [ { source: ['pubs.acs.org/journal/:id', 'pubs.acs.org/'], }, ], - name: 'Unknown', + name: 'Journal', maintainers: ['nczitzk'], handler, + description: `::: tip +See [Browse Content](https://pubs.acs.org) +:::`, }; async function handler(ctx) { diff --git a/lib/routes/aicaijing/cover.ts b/lib/routes/aicaijing/cover.ts new file mode 100644 index 000000000..e73ec8a3f --- /dev/null +++ b/lib/routes/aicaijing/cover.ts @@ -0,0 +1,18 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/cover', + categories: ['finance'], + example: '/aicaijing/cover', + radar: [ + { + source: ['www.aicaijing.com/'], + target: '/cover', + }, + ], + name: '封面文章', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/aicaijing/index.tsx b/lib/routes/aicaijing/index.tsx index 19d768e4b..276fbecb3 100644 --- a/lib/routes/aicaijing/index.tsx +++ b/lib/routes/aicaijing/index.tsx @@ -2,18 +2,27 @@ import { raw } from 'hono/html'; import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; +import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { - path: '/:category?/:id?', - name: 'Unknown', - maintainers: [], + path: '/latest', + categories: ['finance'], + example: '/aicaijing/latest', + radar: [ + { + source: ['www.aicaijing.com/'], + target: '/latest', + }, + ], + name: '最新文章', + maintainers: ['nczitzk'], handler, }; -async function handler(ctx) { - const category = ctx.req.param('category') ?? 'latest'; +export async function handler(ctx) { + const category = getSubPath(ctx).split('/', 2)[1]; const id = ctx.req.param('id') ?? 14; const titles = { diff --git a/lib/routes/aicaijing/information.ts b/lib/routes/aicaijing/information.ts new file mode 100644 index 000000000..fa00cb2af --- /dev/null +++ b/lib/routes/aicaijing/information.ts @@ -0,0 +1,38 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/information/:id?', + categories: ['finance'], + example: '/aicaijing/information/14', + parameters: { + id: '栏目 id,可在对应栏目页 URL 中找到,默认为 14,即热点最新', + }, + description: `| 栏目 id | 栏目 | +| ------- | ----------- | +| 14 | 热点 - 最新 | +| 5 | 热点 - 科技 | +| 9 | 热点 - 消费 | +| 7 | 热点 - 出行 | +| 13 | 热点 - 文娱 | +| 10 | 热点 - 教育 | +| 25 | 热点 - 地产 | +| 11 | 热点 - 更多 | +| 28 | 深度 - 出行 | +| 29 | 深度 - 科技 | +| 31 | 深度 - 消费 | +| 33 | 深度 - 教育 | +| 34 | 深度 - 更多 | +| 8 | 深度 - 地产 | +| 6 | 深度 - 文娱 |`, + radar: [ + { + source: ['www.aicaijing.com/information/:id', 'www.aicaijing.com/'], + target: '/information/:id?', + }, + ], + name: '热点 & 深度', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/aicaijing/recommend.ts b/lib/routes/aicaijing/recommend.ts new file mode 100644 index 000000000..8b106d607 --- /dev/null +++ b/lib/routes/aicaijing/recommend.ts @@ -0,0 +1,18 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/recommend', + categories: ['finance'], + example: '/aicaijing/recommend', + radar: [ + { + source: ['www.aicaijing.com/'], + target: '/recommend', + }, + ], + name: '推荐资讯', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/aijishu/index.ts b/lib/routes/aijishu/index.ts index 1184967c3..42c446b04 100644 --- a/lib/routes/aijishu/index.ts +++ b/lib/routes/aijishu/index.ts @@ -19,7 +19,7 @@ export const route: Route = { supportScihub: false, }, name: '频道、专栏、用户', - maintainers: [], + maintainers: ['bigfei'], handler, description: `| type | 说明 | | ------- | ---- | diff --git a/lib/routes/aisixiang/toplist.ts b/lib/routes/aisixiang/toplist.ts index dd225c45a..a4908ea57 100644 --- a/lib/routes/aisixiang/toplist.ts +++ b/lib/routes/aisixiang/toplist.ts @@ -7,8 +7,11 @@ import { parseDate } from '@/utils/parse-date'; import { ossUrl, ProcessFeed, rootUrl } from './utils'; export const route: Route = { - path: ['/ranking/:id?/:period?', '/toplist/:id?/:period?'], - name: 'Unknown', + path: '/toplist/:id?/:period?', + categories: ['reading'], + example: '/aisixiang/toplist/1/7', + parameters: { id: '类型', period: '范围, 仅适用于点击排行榜, 可选一天(1),一周(7),一月(30),所有(-1),默认为一天' }, + name: '排行', maintainers: ['HenryQW', 'nczitzk'], handler, description: `| 文章点击排行 | 最近更新文章 | 文章推荐排行 | diff --git a/lib/routes/aljazeera/index.tsx b/lib/routes/aljazeera/index.tsx index 1e64c9013..5905d5fca 100644 --- a/lib/routes/aljazeera/index.tsx +++ b/lib/routes/aljazeera/index.tsx @@ -35,14 +35,45 @@ const renderDescription = (image, description) => ); export const route: Route = { - path: '*', - name: 'Unknown', + path: '/:language?/:category{.+}?', + categories: ['traditional-media'], + example: '/aljazeera/english/news', + parameters: { + language: 'Language, see below, arabic by default, as Arabic', + category: 'Category, can be found in URL, homepage by default', + }, + description: `Language + +| Arabic | Chinese | English | +| ------ | ------- | ------- | +| arabic | chinese | english | + +::: tip +If you subscribe to [Al Jazeera English - Economy](https://www.aljazeera.com/economy), whose language is \`english\` and whose path is \`economy\`, you can get the route as [\`/aljazeera/english/economy\`](https://rsshub.app/aljazeera/english/economy) + +If you subscribe to [Al Jazeera Chinese - Political](https://chinese.aljazeera.net/news/political) with language \`chinese\` and path \`news/political\`, you can get the route as [\`/aljazeera/chinese/news/political\`](https://rsshub.app/aljazeera/chinese/news/political) +:::`, + radar: [ + { + source: ['www.aljazeera.com/:category', 'www.aljazeera.com/'], + target: '/english/:category', + }, + { + source: ['www.aljazeera.net/:category', 'www.aljazeera.net/'], + target: '/arabic/:category', + }, + { + source: ['chinese.aljazeera.net/:category', 'chinese.aljazeera.net/'], + target: '/chinese/:category', + }, + ], + name: 'News', maintainers: ['nczitzk'], handler, }; -async function handler(ctx) { - const params = getSubPath(ctx) === '/' ? ['arabic'] : getSubPath(ctx).replace(/^\//, '').split('/'); +export async function handler(ctx) { + const params = getSubPath(ctx).split('/').filter(Boolean); if (!Object.hasOwn(languages, params[0])) { params.unshift('arabic'); diff --git a/lib/routes/aljazeera/rss.ts b/lib/routes/aljazeera/rss.ts new file mode 100644 index 000000000..d31f95809 --- /dev/null +++ b/lib/routes/aljazeera/rss.ts @@ -0,0 +1,34 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/:language?/rss', + categories: ['traditional-media'], + example: '/aljazeera/english/rss', + parameters: { + language: 'Language, see below, arabic by default, as Arabic', + }, + description: `Language + +| Arabic | Chinese | English | +| ------ | ------- | ------- | +| arabic | chinese | english | + +::: tip +There is no RSS source for Al Jazeera Chinese, returning homepage content by default +:::`, + radar: [ + { + source: ['www.aljazeera.com/xml/rss/all.xml', 'www.aljazeera.com/'], + target: '/english/rss', + }, + { + source: ['www.aljazeera.net/rss', 'www.aljazeera.net/'], + target: '/arabic/rss', + }, + ], + name: 'Official RSS', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/aljazeera/tag.ts b/lib/routes/aljazeera/tag.ts new file mode 100644 index 000000000..7509769b6 --- /dev/null +++ b/lib/routes/aljazeera/tag.ts @@ -0,0 +1,39 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/:language?/tag/:id', + categories: ['traditional-media'], + example: '/aljazeera/english/tag/science-and-technology', + parameters: { + language: 'Language, see below, arabic by default, as Arabic', + id: 'Tag id, can be found in URL', + }, + description: `Language + +| Arabic | Chinese | English | +| ------ | ------- | ------- | +| arabic | chinese | english | + +::: tip +If you subscribe to [Al Jazeera English - Science and Technology](https://www.aljazeera.com/tag/science-and-technology), whose language is \`english\` and whose path is \`science-and-technology\`, you can get the route as [\`/aljazeera/english/tag/science-and-technology\`](https://rsshub.app/aljazeera/english/tag/science-and-technology) +:::`, + radar: [ + { + source: ['www.aljazeera.com/tag/:id', 'www.aljazeera.com/'], + target: '/english/tag/:id', + }, + { + source: ['www.aljazeera.net/tag/:id', 'www.aljazeera.net/'], + target: '/arabic/tag/:id', + }, + { + source: ['chinese.aljazeera.net/tag/:id', 'chinese.aljazeera.net/'], + target: '/chinese/tag/:id', + }, + ], + name: 'Tag', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/amazon/awsblogs.ts b/lib/routes/amazon/awsblogs.ts index c92575515..c2911e4c1 100644 --- a/lib/routes/amazon/awsblogs.ts +++ b/lib/routes/amazon/awsblogs.ts @@ -4,7 +4,15 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/awsblogs/:locale?', - name: 'Unknown', + categories: ['blog'], + example: '/amazon/awsblogs', + parameters: { + locale: 'Blog posts in a specified language, only the following options are supported. Default `zh_CN`', + }, + description: `| zh\\_CN | en\\_US | fr\\_FR | de\\_DE | ja\\_JP | ko\\_KR | pt\\_BR | es\\_ES | ru\\_RU | id\\_ID | tr\\_TR | +| ------- | ------- | ------ | ------ | -------- | ------ | ---------- | ------- | ------- | ---------- | ------- | +| Chinese | English | French | German | Japanese | Korean | Portuguese | Spanish | Russian | Indonesian | Turkish |`, + name: 'AWS Blogs', maintainers: ['HankChow'], handler, }; diff --git a/lib/routes/amazon/kindle-software-updates.tsx b/lib/routes/amazon/kindle-software-updates.tsx index 85510f647..a26c07883 100644 --- a/lib/routes/amazon/kindle-software-updates.tsx +++ b/lib/routes/amazon/kindle-software-updates.tsx @@ -19,7 +19,7 @@ export const route: Route = { supportScihub: false, }, name: 'Kindle Software Updates', - maintainers: ['EthanWng97'], + maintainers: ['IvanWng97'], handler, }; diff --git a/lib/routes/aqara/news.ts b/lib/routes/aqara/news.ts index 6017ad4a0..e28bfe468 100644 --- a/lib/routes/aqara/news.ts +++ b/lib/routes/aqara/news.ts @@ -7,8 +7,10 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/cn/news', - name: 'Unknown', - maintainers: [], + categories: ['other'], + example: '/aqara/cn/news', + name: '新闻', + maintainers: ['nczitzk'], handler, }; diff --git a/lib/routes/aqara/post.tsx b/lib/routes/aqara/post.tsx index d692b1eb6..bcdc2aeab 100644 --- a/lib/routes/aqara/post.tsx +++ b/lib/routes/aqara/post.tsx @@ -2,14 +2,22 @@ import { load } from 'cheerio'; import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; -import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { - path: '*', - name: 'Unknown', - maintainers: [], + path: '/:path{.+}?', + categories: ['other'], + example: '/aqara/en/category/press-release', + parameters: { path: '路径,默认为首页' }, + description: `路径处填写对应页面 URL 中 \`https://aqara.com/\` 后的字段,形如 \`:region/category/:id\` 或 \`:region/tag/:id\`。 + +| 参数 | 说明 | +| ------ | -------------------------------------------------------- | +| region | 地区 id,可在对应分类页 URL 中找到,默认为 en,即 Global | +| id | 分类 id 或标签 id,可在对应分类页或标签页 URL 中找到 |`, + name: '分类、标签', + maintainers: ['nczitzk'], handler, }; @@ -24,7 +32,7 @@ async function handler(ctx) { let currentUrl = rootUrl; let apiUrl = new URL(`${apiSlug}/posts?_embed=true&per_page=${limit}`, rootUrl).href; - const filterMatches = getSubPath(ctx).match(/^\/([^/]*)\/([^/]*)\/(.*)$/); + const filterMatches = (ctx.req.param('path') ?? '').match(/^([^/]*)\/([^/]*)\/(.*)$/); if (filterMatches) { const filterRegion = filterMatches[1]; diff --git a/lib/routes/aqara/region.ts b/lib/routes/aqara/region.ts index b321cfeb5..d8954d3c9 100644 --- a/lib/routes/aqara/region.ts +++ b/lib/routes/aqara/region.ts @@ -2,8 +2,21 @@ import type { Route } from '@/types'; export const route: Route = { path: '/:region/:type?', - name: 'Unknown', - maintainers: [], + categories: ['other'], + example: '/aqara/en/news', + parameters: { + region: '地区 id,可在对应新闻页 URL 中找到,默认为 en,即 Global', + type: '类型,见下表,默认为 news,即新闻', + }, + description: `| 中国 / 大陆 | 대한민국 | Europe | United States | Russia | Global | +| ----------- | -------- | ------ | ------------- | ------ | ------ | +| cn | kr | eu | us | ru | en | + +| 新闻 | 博客 | +| ---- | ---- | +| news | blog |`, + name: '新闻、博客', + maintainers: ['nczitzk'], handler, }; diff --git a/lib/routes/arcteryx/new-arrivals.ts b/lib/routes/arcteryx/new-arrivals.ts index 18ff9acdf..72cf961de 100644 --- a/lib/routes/arcteryx/new-arrivals.ts +++ b/lib/routes/arcteryx/new-arrivals.ts @@ -23,7 +23,7 @@ export const route: Route = { }, ], name: 'New Arrivals', - maintainers: ['EthanWng97'], + maintainers: ['IvanWng97'], handler, description: `Country diff --git a/lib/routes/arcteryx/outlet.ts b/lib/routes/arcteryx/outlet.ts index 86f011f41..222d51e09 100644 --- a/lib/routes/arcteryx/outlet.ts +++ b/lib/routes/arcteryx/outlet.ts @@ -23,7 +23,7 @@ export const route: Route = { }, ], name: 'Outlet', - maintainers: ['EthanWng97'], + maintainers: ['IvanWng97'], handler, description: `Country diff --git a/lib/routes/arcteryx/regear-new-arrivals.tsx b/lib/routes/arcteryx/regear-new-arrivals.tsx index 7394abf81..bd6b4773e 100644 --- a/lib/routes/arcteryx/regear-new-arrivals.tsx +++ b/lib/routes/arcteryx/regear-new-arrivals.tsx @@ -27,7 +27,7 @@ export const route: Route = { }, ], name: 'Regear New Arrivals', - maintainers: ['EthanWng97'], + maintainers: ['IvanWng97'], handler, url: 'regear.arcteryx.com/shop/new-arrivals', }; diff --git a/lib/routes/asiantolick/category.ts b/lib/routes/asiantolick/category.ts new file mode 100644 index 000000000..5f62ab65a --- /dev/null +++ b/lib/routes/asiantolick/category.ts @@ -0,0 +1,35 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/category/:id', + categories: ['picture'], + example: '/asiantolick/category/90', + parameters: { + id: 'Category id, can be found in URL', + }, + features: { + nsfw: true, + }, + radar: [ + { + source: ['asiantolick.com/category-:id'], + target: '/category/:id', + }, + ], + name: 'Category', + maintainers: ['nczitzk'], + handler, + url: 'asiantolick.com/', + description: `| Category | id | +| ---------- | ---- | +| Lolita | 90 | +| Hot Sister | 91 | +| Cosplay | 1030 | +| Sexy | 93 | +| Others | 94 | +| Thailand | 99 | +| Magazine | 100 | +| Hard Sexy | 103 |`, +}; diff --git a/lib/routes/asiantolick/index.ts b/lib/routes/asiantolick/index.ts index 04b58df8f..d9996974d 100644 --- a/lib/routes/asiantolick/index.ts +++ b/lib/routes/asiantolick/index.ts @@ -2,21 +2,24 @@ import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; +import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { renderDescription } from './templates/description'; export const route: Route = { - path: '/:category{.+}?', + path: '/', + categories: ['picture'], + example: '/asiantolick', radar: [ { source: ['asiantolick.com/'], - target: '', + target: '/', }, ], - name: 'Unknown', - maintainers: [], + name: 'Top rated', + maintainers: ['nczitzk'], handler, url: 'asiantolick.com/', features: { @@ -24,23 +27,21 @@ export const route: Route = { }, }; -async function handler(ctx) { - const category = ctx.req.param('category'); +export async function handler(ctx) { + const category = getSubPath(ctx).slice(1); const limit = ctx.req.query('limit') ? Number(ctx.req.query('limit')) : 24; const rootUrl = 'https://asiantolick.com'; const apiUrl = new URL('ajax/buscar_posts.php', rootUrl).href; - const currentUrl = new URL(category?.replace(/^(tag|category)?\/(\d+)/, '$1-$2') ?? '', rootUrl).href; + const currentUrl = new URL(category.replace(/^(tag|category)?\/(\d+)/, '$1-$2'), rootUrl).href; const searchParams = {}; - const matches = category?.match(/^(tag|category|search|page)?[/-]?(\w+)/) ?? undefined; + const matches = category.match(/^(tag|category|search|page)?[/-]?(\w+)/); if (matches) { const key = matches[1] === 'category' ? 'cat' : matches[1]; const value = matches[2]; searchParams[key] = value; - } else if (category) { - searchParams.page = 'news'; } const { data: response } = await got(apiUrl, { diff --git a/lib/routes/asiantolick/page.ts b/lib/routes/asiantolick/page.ts new file mode 100644 index 000000000..9e77c05ff --- /dev/null +++ b/lib/routes/asiantolick/page.ts @@ -0,0 +1,25 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/page/:id', + categories: ['picture'], + example: '/asiantolick/page/news', + parameters: { + id: 'Page id', + }, + features: { + nsfw: true, + }, + radar: [ + { + source: ['asiantolick.com/page/:id'], + target: '/page/:id', + }, + ], + name: 'Page', + maintainers: ['nczitzk'], + handler, + url: 'asiantolick.com/', +}; diff --git a/lib/routes/asiantolick/search.ts b/lib/routes/asiantolick/search.ts new file mode 100644 index 000000000..0e4312475 --- /dev/null +++ b/lib/routes/asiantolick/search.ts @@ -0,0 +1,25 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/search/:keyword', + categories: ['picture'], + example: '/asiantolick/search/lolita', + parameters: { + keyword: 'Keyword', + }, + features: { + nsfw: true, + }, + radar: [ + { + source: ['asiantolick.com/search/:keyword'], + target: '/search/:keyword', + }, + ], + name: 'Search', + maintainers: ['nczitzk'], + handler, + url: 'asiantolick.com/', +}; diff --git a/lib/routes/asiantolick/tag.ts b/lib/routes/asiantolick/tag.ts new file mode 100644 index 000000000..8f5dba395 --- /dev/null +++ b/lib/routes/asiantolick/tag.ts @@ -0,0 +1,64 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/tag/:id', + categories: ['picture'], + example: '/asiantolick/tag/1045', + parameters: { + id: 'Tag id, can be found in URL', + }, + features: { + nsfw: true, + }, + radar: [ + { + source: ['asiantolick.com/tag-:id'], + target: '/tag/:id', + }, + ], + name: 'Tag', + maintainers: ['nczitzk'], + handler, + url: 'asiantolick.com/', + description: `| Aidol | Anal | Babe | Big Boobs | Big Pussy | +| ----- | ---- | ---- | --------- | --------- | +| 2310 | 2233 | 1385 | 1106 | 1722 | + +| Bikini | Blonde | blowjob | Close Up | Creamy Pussy | +| ------ | ------ | ------- | -------- | ------------ | +| 1206 | 2244 | 2167 | 2267 | 1117 | + +| cum | Cute Girl | Dildo | Ebony | Feet | +| ---- | --------- | ----- | ----- | ---- | +| 2163 | 1090 | 1082 | 2245 | 1323 | + +| fetish | fingers | Fox Tail | Glasses | Hairy Pussy | +| ------ | ------- | -------- | ------- | ----------- | +| 2219 | 2197 | 1540 | 1268 | 1099 | + +| Interracial | Lesbian | licked | Loli | Maid | +| ----------- | ------- | ------ | ---- | ---- | +| 2284 | 1080 | 2208 | 1045 | 1072 | + +| Masturbate | Milf | non-nude | Nude | Nurse | +| ---------- | ---- | -------- | ---- | ----- | +| 1081 | 1705 | 2307 | 1393 | 1552 | + +| Office | oiled | Outdoor | Pink Pussy | Pink Tits | +| ------ | ----- | ------- | ---------- | --------- | +| 1724 | 2176 | 2250 | 1161 | 1498 | + +| Public | School Girl | Short Hair | skirt | Small Girl | +| ------ | ----------- | ---------- | ----- | ---------- | +| 1277 | 1046 | 1160 | 2159 | 1103 | + +| Socks | sucking | Tattoo | Teen | Tiny Tits | +| ----- | ------- | ------ | ---- | --------- | +| 2256 | 2199 | 1593 | 1036 | 2251 | + +| Underwear | Uniform | wet | Young | +| --------- | ------- | ---- | ----- | +| 1324 | 1084 | 2179 | 1098 |`, +}; diff --git a/lib/routes/bad/index.ts b/lib/routes/bad/index.ts index 0bd8050db..ac4654c4d 100644 --- a/lib/routes/bad/index.ts +++ b/lib/routes/bad/index.ts @@ -1,21 +1,27 @@ import { load } from 'cheerio'; import type { Route } from '@/types'; -import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; export const route: Route = { - path: '*', - name: 'Unknown', - maintainers: [], + path: '/:path{.+}?', + categories: ['new-media'], + example: '/bad', + parameters: { path: '路径,默认为首页热门' }, + description: `若订阅 [每日热点 - 最新](https://bad.news/tag/每日热点/sort-new),网址为 \`https://bad.news/tag/每日热点/sort-new\`。截取 \`https://bad.news\` 到末尾的部分 \`/tag/每日热点/sort-new\` 作为参数,此时路由为 [\`/bad/tag/每日热点/sort-new\`](https://rsshub.app/bad/tag/每日热点/sort-new)。 + +若订阅子分类 [大陆资讯 - 热门](https://bad.news/tag/大陆资讯/sort-hot),网址为 \`https://bad.news/tag/大陆资讯/sort-hot\`。截取 \`https://bad.news\` 到末尾的部分 \`/tag/大陆资讯/sort-hot\` 作为参数,路由为 [\`/bad/tag/大陆资讯/sort-hot\`](https://rsshub.app/bad/tag/大陆资讯/sort-hot)。`, + name: '通用', + maintainers: ['nczitzk'], handler, }; async function handler(ctx) { const rootUrl = 'https://bad.news'; - const currentUrl = `${rootUrl}${getSubPath(ctx) === '/' ? '' : getSubPath(ctx)}`; + const path = ctx.req.param('path'); + const currentUrl = path ? `${rootUrl}/${path}` : rootUrl; const response = await got({ method: 'get', diff --git a/lib/routes/bast/index.ts b/lib/routes/bast/index.ts index ade47e473..462a95673 100644 --- a/lib/routes/bast/index.ts +++ b/lib/routes/bast/index.ts @@ -2,24 +2,36 @@ import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; -import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; export const route: Route = { - path: '*', - name: 'Unknown', - maintainers: [], + path: '/:path{.+}?', + categories: ['new-media'], + example: '/bast/col/col31266', + parameters: { path: '路径,默认为通知公告' }, + features: { + antiCrawler: true, + }, + name: '通用', + maintainers: ['nczitzk'], + description: `路径处填写对应页面 URL 中 \`https://www.bast.net.cn/\` 后的字段。下面是两个例子。 + +若订阅 [通知公告](https://www.bast.net.cn/col/col31266) 则将对应页面 URL 中 \`https://www.bast.net.cn/\` 后的字段 \`col/col31266\` 作为路径填入。此时路由为 [\`/bast/col/col31266\`](https://rsshub.app/bast/col/col31266) + +若订阅 [学术动态](https://www.bast.net.cn/col/col31530) 则将对应页面 URL 中 \`https://www.bast.net.cn/\` 后的字段 \`col/col31530\` 作为路径填入。此时路由为 [\`/bast/col/col31530\`](https://rsshub.app/bast/col/col31530) + +如果路由符合 \`/col/colXXXXX\` 的格式,可以由 [\`/bast/col/col31266\`](https://rsshub.app/bast/col/col31266) 精简为 [\`/bast/31266\`](https://rsshub.app/bast/31266)`, handler, }; async function handler(ctx) { - const colPath = getSubPath(ctx).replace(/^\//, '') || '32942'; + const colPath = ctx.req.param('path') ?? '32942'; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 50; const rootUrl = 'https://www.bast.net.cn'; - const currentUrl = `${rootUrl}/${Number.isNaN(colPath) ? colPath : `col/col${colPath}`}/`; + const currentUrl = `${rootUrl}/${Number.isNaN(Number(colPath)) ? colPath : `col/col${colPath}`}/`; const response = await got({ method: 'get', diff --git a/lib/routes/bellroy/new-releases.ts b/lib/routes/bellroy/new-releases.ts index a706ef4fb..7b3925cd8 100644 --- a/lib/routes/bellroy/new-releases.ts +++ b/lib/routes/bellroy/new-releases.ts @@ -20,7 +20,7 @@ export const route: Route = { }, ], name: 'New Releases', - maintainers: ['EthanWng97'], + maintainers: ['IvanWng97'], handler, url: 'bellroy.com/collection/new-releases', }; diff --git a/lib/routes/bilibili/video-all.ts b/lib/routes/bilibili/video-all.ts index ea5e55655..574b17e1f 100644 --- a/lib/routes/bilibili/video-all.ts +++ b/lib/routes/bilibili/video-all.ts @@ -8,7 +8,7 @@ import utils from './utils'; export const route: Route = { path: '/user/video-all/:uid/:embed?', name: '用户所有视频', - maintainers: [], + maintainers: ['CcccFz'], handler, example: '/bilibili/user/video-all/2267573', parameters: { diff --git a/lib/routes/biodiscover/index.ts b/lib/routes/biodiscover/index.ts deleted file mode 100644 index 9f576d06f..000000000 --- a/lib/routes/biodiscover/index.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { load } from 'cheerio'; - -import type { Route } from '@/types'; -import cache from '@/utils/cache'; -import got from '@/utils/got'; -import { parseDate } from '@/utils/parse-date'; - -export const route: Route = { - path: '/:channel?', - radar: [ - { - source: ['www.biodiscover.com/:channel'], - target: '/:channel', - }, - ], - name: 'Unknown', - maintainers: ['aidistan'], - handler, -}; - -async function handler(ctx) { - const channel = ctx.req.param('channel'); - const listUrl = 'http://www.biodiscover.com/' + channel; - const response = await got({ url: listUrl }); - const $ = load(response.data); - - const items = $('.new_list .newList_box') - .toArray() - .map((item) => ({ - pubDate: parseDate($(item).find('.news_flow_tag .times').text().trim()), - link: 'http://www.biodiscover.com' + $(item).find('h2 a').attr('href'), - })); - - return { - title: '生物探索 - ' + $('.header li.sel a').text(), - link: listUrl, - description: $('meta[name=description]').attr('content'), - item: await Promise.all( - items.map((item) => - cache.tryGet(item.link, async () => { - const detailResponse = await got({ url: item.link }); - const $ = load(detailResponse.data); - - // remove sharing info if exists - const lastNode = $('.main_info').children().last(); - if (lastNode.css('display') === 'none') { - lastNode.remove(); - } - - return { - title: $('h1').text().trim(), - description: $('.main_info').html(), - pubDate: item.pubDate, - link: item.link, - }; - }) - ) - ), - }; -} diff --git a/lib/routes/biodiscover/namespace.ts b/lib/routes/biodiscover/namespace.ts deleted file mode 100644 index e81481e84..000000000 --- a/lib/routes/biodiscover/namespace.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { Namespace } from '@/types'; - -export const namespace: Namespace = { - name: 'biodiscover.com 生物探索', - url: 'www.biodiscover.com', - lang: 'zh-CN', -}; diff --git a/lib/routes/biquge/index.ts b/lib/routes/biquge/index.ts index d2d27c128..29286c71c 100644 --- a/lib/routes/biquge/index.ts +++ b/lib/routes/biquge/index.ts @@ -5,7 +5,6 @@ import { config } from '@/config'; import ConfigNotFoundError from '@/errors/types/config-not-found'; import type { Route } from '@/types'; import cache from '@/utils/cache'; -import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; @@ -29,15 +28,41 @@ const allowHost = new Set([ ]); export const route: Route = { - path: '*', - name: 'Unknown', - maintainers: [], + path: '/:url{.+}', + categories: ['reading'], + example: '/biquge/http://www.biqu5200.net/0_7/', + parameters: { url: '小说 Url,即对应小说详情页的 Url,可在地址栏中找到' }, + features: { + antiCrawler: true, + }, + name: '小说', + maintainers: ['nczitzk'], + description: `::: tip + +#### 使用方法 + +如订阅 [《大主宰》](http://www.biqu5200.net/0_7/),此时在 [biqu5200.net](http://www.biqu5200.net) 中查询得到对应小说详情页 URL 为 \`http://www.biqu5200.net/0_7/\`。此时,路由为 [\`/biquge/http://www.biqu5200.net/0_7/\`](https://rsshub.app/biquge/http://www.biqu5200.net/0_7/) + +又如同样订阅 [《大主宰》](https://www.shuquge.com/txt/70/index.html),此时在 [shuquge.com](https://www.shuquge.com) 中查询得到对应小说详情页 URL 为 \`https://www.shuquge.com/txt/70/index.html\`。此时,把末尾的 \`index.html\` 去掉,路由为 [\`/biquge/https://www.shuquge.com/txt/70/\`](https://rsshub.app/biquge/https://www.shuquge.com/txt/70/) + +#### 关于章节数 + +路由默认返回最新 **1** 个章节,如有需要一次性获取多个章节,可在路由后指定 \`limit\` 参数。如上面的例子:订阅 [《大主宰》](http://www.biqu5200.net/0_7/) 并获取最新的 **10** 个章节。此时,路由为 [\`/biquge/http://www.biqu5200.net/0_7/?limit=10\`](https://rsshub.app/biquge/http://www.biqu5200.net/0_7/?limit=10) + +需要注意的是,单次获取的所有章节更新时间统一设定为最新章节的更新时间。也就是说,获取最新的 **10** 个章节时,除了最新 **1** 个章节的更新时间是准确的(和网站一致的),其他 **9** 个章节的更新时间是不准确的。 + +另外,若设置获取章节数目过多,可能会触发网站反爬,导致路由不可用。 +::: + +::: warning +上方列举的网址可能部分不可用,这取决于该网站的维护者是否持续运营网站。请选择可以正常访问的网址,获取更新的前提是该网站可以正常访问。 +:::`, handler, }; async function handler(ctx) { - const rootUrl = getSubPath(ctx).split('/').slice(1, 4).join('/'); - const currentUrl = getSubPath(ctx).slice(1); + const currentUrl = ctx.req.param('url'); + const rootUrl = currentUrl.split('/').slice(0, 3).join('/'); if (!config.feature.allow_user_supply_unsafe_domain && !allowHost.has(new URL(rootUrl).hostname)) { throw new ConfigNotFoundError(`This RSS is disabled unless 'ALLOW_USER_SUPPLY_UNSAFE_DOMAIN' is set to 'true'.`); } diff --git a/lib/routes/bnu/fdy.ts b/lib/routes/bnu/fdy.ts index b94dbfc77..1c0cdb53d 100644 --- a/lib/routes/bnu/fdy.ts +++ b/lib/routes/bnu/fdy.ts @@ -7,9 +7,15 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/fdy/:path{.+}?', - name: 'Unknown', - maintainers: [], + categories: ['university'], + example: '/bnu/fdy/tzgg/dwjs', + parameters: { path: '路径,默认为 `tzgg`' }, + name: '党委学生工作部辅导员发展中心', + maintainers: ['TonyRL'], handler, + description: `路径处填写对应页面 URL 中 \`https://fdy.bnu.edu.cn/\` 和 \`/index.htm\` 之间的字段。下面是一个例子。 + +若订阅 [通知公告 > 队伍建设](https://fdy.bnu.edu.cn/tzgg/dwjs/index.htm) 则将对应页面 URL 中 \`https://fdy.bnu.edu.cn/\` 和 \`/index.htm\` 之间的字段 \`tzgg/dwjs\` 作为路径填入。此时路由为 [\`/bnu/fdy/tzgg/dwjs\`](https://rsshub.app/bnu/fdy/tzgg/dwjs)`, }; async function handler(ctx) { diff --git a/lib/routes/bnu/lib.ts b/lib/routes/bnu/lib.ts index 12c815ad8..e5eda46ad 100644 --- a/lib/routes/bnu/lib.ts +++ b/lib/routes/bnu/lib.ts @@ -7,15 +7,21 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/lib/:category?', + categories: ['university'], + example: '/bnu/lib/zydt', + parameters: { category: '分类,见下表,默认为 `zydt`' }, radar: [ { source: ['www.lib.bnu.edu.cn/:category/index.htm'], target: '/lib/:category', }, ], - name: 'Unknown', + name: '图书馆通知', maintainers: ['TonyRL'], handler, + description: `| 资源动态 | 新闻动态 | 系列讲座 | +| -------- | -------- | -------- | +| zydt | xwdt | xljz1 |`, }; async function handler(ctx) { diff --git a/lib/routes/brooklynmuseum/exhibitions.ts b/lib/routes/brooklynmuseum/exhibitions.ts index 9e7980ccf..0c55e9efb 100644 --- a/lib/routes/brooklynmuseum/exhibitions.ts +++ b/lib/routes/brooklynmuseum/exhibitions.ts @@ -15,7 +15,7 @@ export const route: Route = { supportScihub: false, }, name: 'Exhibitions', - maintainers: [], + maintainers: ['chazeon'], handler, }; diff --git a/lib/routes/bwsg/index.ts b/lib/routes/bwsg/index.ts index 2b9cfc04a..8a1b1eca7 100644 --- a/lib/routes/bwsg/index.ts +++ b/lib/routes/bwsg/index.ts @@ -1,7 +1,6 @@ import { load } from 'cheerio'; import type { Data, DataItem, Route } from '@/types'; -import { getSubPath } from '@/utils/common-utils'; import ofetch from '@/utils/ofetch'; const FEED_TITLE = 'Immobilien - BWSG' as const; @@ -13,7 +12,8 @@ const BASE_URL = `${SITE_URL}/immobilien/immobilie-suchen/`; export const route: Route = { name: 'Angebote', example: '/bwsg/_vermarktungsart=miete&_objektart=wohnung&_zimmer=2,3&_wohnflaeche=45,70&_plz=1210,1220', - path: '*', + path: '/:path{.+}?', + parameters: { path: 'Query parameters of the search, without the leading `?`, see the description below' }, maintainers: ['sk22'], categories: ['other'], description: `Copy the query parameters for your @@ -28,7 +28,7 @@ RSS feed might not get all items. :::`, async handler(ctx) { - let params = getSubPath(ctx).slice(1); + let params = ctx.req.param('path') ?? ''; if (params.startsWith('&')) { params = params.slice(1); } diff --git a/lib/routes/bytes/bytes.ts b/lib/routes/bytes/bytes.ts index 906306c11..f348a358e 100644 --- a/lib/routes/bytes/bytes.ts +++ b/lib/routes/bytes/bytes.ts @@ -8,14 +8,17 @@ const currentURL = 'https://bytes.dev/archives'; export const route: Route = { path: '/', + categories: ['programming'], + example: '/bytes', radar: [ { source: ['bytes.dev/archives', 'bytes.dev/'], target: '', }, ], - name: 'Unknown', + name: 'Your weekly dose of JS', maintainers: ['meixger'], + description: 'Staying informed on the JavaScript ecosystem has never been so entertaining. Delivered every Monday and Thursday, for free.', handler, url: 'bytes.dev/archives', }; diff --git a/lib/routes/caam/index.ts b/lib/routes/caam/index.ts index 79090a018..2cd763d78 100644 --- a/lib/routes/caam/index.ts +++ b/lib/routes/caam/index.ts @@ -7,7 +7,117 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/:category?', - name: 'Unknown', + categories: ['other'], + example: '/caam/1', + parameters: { category: '分类,见下表,默认为首页' }, + description: `| [首页](http://www.caam.org.cn/chn/1/cate_1/list_1.html) | [行业要闻](http://www.caam.org.cn/chn/1/cate_2/list_1.html) | [协会活动](http://www.caam.org.cn/chn/1/cate_3/list_1.html) | [会员专区](http://www.caam.org.cn/chn/1/cate_4/list_1.html) | [协会概况](http://www.caam.org.cn/chn/1/cate_5/list_1.html) | [协会概况 - 会员单位](http://www.caam.org.cn/chn/1/cate_6/list_1.html) | +| ------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | ---------------------------------------------------------------------- | +| 1 | 2 | 3 | 4 | 5 | 6 | + +| [协会概况 - 协会简介](http://www.caam.org.cn/chn/1/cate_7/list_1.html) | [协会概况 - 协会章程](http://www.caam.org.cn/chn/1/cate_8/list_1.html) | [协会概况 - 组织机构](http://www.caam.org.cn/chn/1/cate_9/list_1.html) | [协会概况 - 主要职责](http://www.caam.org.cn/chn/1/cate_10/list_1.html) | [协会概况 - 协会荣誉](http://www.caam.org.cn/chn/1/cate_11/list_1.html) | [协会概况 - 分支机构](http://www.caam.org.cn/chn/1/cate_12/list_1.html) | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| 7 | 8 | 9 | 10 | 11 | 12 | + +| [协会概况 - 分支机构 - 机构介绍](http://www.caam.org.cn/chn/1/cate_13/list_1.html) | [协会概况 - 分支机构 - 管理办法](http://www.caam.org.cn/chn/1/cate_14/list_1.html) | [协会概况 - 分支机构 - 业务范围](http://www.caam.org.cn/chn/1/cate_15/list_1.html) | [协会工作](http://www.caam.org.cn/chn/1/cate_16/list_1.html) | [协会工作 - 协会动态](http://www.caam.org.cn/chn/1/cate_17/list_1.html) | [协会工作 - 分支机构动态](http://www.caam.org.cn/chn/1/cate_18/list_1.html) | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| 13 | 14 | 15 | 16 | 17 | 18 | + +| [协会工作 - 重点工作](http://www.caam.org.cn/chn/1/cate_19/list_1.html) | [协会工作 - 法规标准](http://www.caam.org.cn/chn/1/cate_20/list_1.html) | [协会工作 - 信用服务](http://www.caam.org.cn/chn/1/cate_21/list_1.html) | [协会工作 - 会员服务](http://www.caam.org.cn/chn/1/cate_22/list_1.html) | [协会工作 - 政策研究](http://www.caam.org.cn/chn/1/cate_23/list_1.html) | [协会工作 - 协调合作](http://www.caam.org.cn/chn/1/cate_24/list_1.html) | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| 19 | 20 | 21 | 22 | 23 | 24 | + +| [协会工作 - 展会信息](http://www.caam.org.cn/chn/1/cate_25/list_1.html) | [协会工作 - 国际合作](http://www.caam.org.cn/chn/1/cate_26/list_1.html) | [协会工作 - 会员动态](http://www.caam.org.cn/chn/1/cate_27/list_1.html) | [协会工作 - 行业培训](http://www.caam.org.cn/chn/1/cate_28/list_1.html) | [统计数据](http://www.caam.org.cn/chn/1/cate_29/list_1.html) | [统计数据 - 产销](http://www.caam.org.cn/chn/1/cate_30/list_1.html) | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------------- | +| 25 | 26 | 27 | 28 | 29 | 30 | + +| [统计数据 - 产销 - 汽车](http://www.caam.org.cn/chn/1/cate_31/list_1.html) | [统计数据 - 产销 - 摩托车](http://www.caam.org.cn/chn/1/cate_32/list_1.html) | [统计数据 - 产销 - 零部件](http://www.caam.org.cn/chn/1/cate_33/list_1.html) | [统计数据 - 进出口](http://www.caam.org.cn/chn/1/cate_34/list_1.html) | [统计数据 - 进出口 - 汽车](http://www.caam.org.cn/chn/1/cate_35/list_1.html) | [统计数据 - 进出口 - 摩托车](http://www.caam.org.cn/chn/1/cate_36/list_1.html) | +| -------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | --------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | +| 31 | 32 | 33 | 34 | 35 | 36 | + +| [统计数据 - 进出口 - 零部件](http://www.caam.org.cn/chn/1/cate_37/list_1.html) | [统计数据 - 数据分析](http://www.caam.org.cn/chn/1/cate_38/list_1.html) | [统计数据 - 数据分析 - 国内数据](http://www.caam.org.cn/chn/1/cate_39/list_1.html) | [统计数据 - 数据分析 - 国外数据](http://www.caam.org.cn/chn/1/cate_40/list_1.html) | [统计数据 - 亚洲](http://www.caam.org.cn/chn/1/cate_41/list_1.html) | [统计数据 - 亚洲 - 日本](http://www.caam.org.cn/chn/1/cate_42/list_1.html) | +| ------------------------------------------------------------------------------ | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| 37 | 38 | 39 | 40 | 41 | 42 | + +| [统计数据 - 亚洲 - 泰国](http://www.caam.org.cn/chn/1/cate_43/list_1.html) | [统计数据 - 亚洲 - 印度](http://www.caam.org.cn/chn/1/cate_44/list_1.html) | [统计数据 - 亚洲 - 印尼](http://www.caam.org.cn/chn/1/cate_45/list_1.html) | [统计数据 - 亚洲 - 韩国](http://www.caam.org.cn/chn/1/cate_46/list_1.html) | [统计数据 - 亚洲 - 巴基斯坦](http://www.caam.org.cn/chn/1/cate_47/list_1.html) | [统计数据 - 亚洲 - 其他](http://www.caam.org.cn/chn/1/cate_48/list_1.html) | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | -------------------------------------------------------------------------- | +| 43 | 44 | 45 | 46 | 47 | 48 | + +| [统计数据 - 欧洲](http://www.caam.org.cn/chn/1/cate_49/list_1.html) | [统计数据 - 欧洲 - 总汇](http://www.caam.org.cn/chn/1/cate_50/list_1.html) | [统计数据 - 欧洲 - 德国](http://www.caam.org.cn/chn/1/cate_51/list_1.html) | [统计数据 - 欧洲 - 英国](http://www.caam.org.cn/chn/1/cate_52/list_1.html) | [统计数据 - 欧洲 - 法国](http://www.caam.org.cn/chn/1/cate_53/list_1.html) | [统计数据 - 欧洲 - 意大利](http://www.caam.org.cn/chn/1/cate_54/list_1.html) | +| ------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| 49 | 50 | 51 | 52 | 53 | 54 | + +| [统计数据 - 欧洲 - 西班牙](http://www.caam.org.cn/chn/1/cate_55/list_1.html) | [统计数据 - 大洋洲](http://www.caam.org.cn/chn/1/cate_56/list_1.html) | [统计数据 - 大洋洲 - 澳大利亚](http://www.caam.org.cn/chn/1/cate_57/list_1.html) | [统计数据 - 大洋洲 - 新西兰](http://www.caam.org.cn/chn/1/cate_58/list_1.html) | [统计数据 - 北美洲](http://www.caam.org.cn/chn/1/cate_59/list_1.html) | [统计数据 - 北美洲 - 总汇](http://www.caam.org.cn/chn/1/cate_60/list_1.html) | +| ---------------------------------------------------------------------------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ | --------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| 55 | 56 | 57 | 58 | 59 | 60 | + +| [统计数据 - 北美洲 - 美国](http://www.caam.org.cn/chn/1/cate_61/list_1.html) | [统计数据 - 南美洲](http://www.caam.org.cn/chn/1/cate_62/list_1.html) | [统计数据 - 南美洲 - 阿根廷](http://www.caam.org.cn/chn/1/cate_63/list_1.html) | [统计数据 - 南美洲 - 巴西](http://www.caam.org.cn/chn/1/cate_64/list_1.html) | [统计数据 - 南美洲 - 其他](http://www.caam.org.cn/chn/1/cate_65/list_1.html) | [统计数据 - 非洲](http://www.caam.org.cn/chn/1/cate_66/list_1.html) | +| ---------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------ | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------- | +| 61 | 62 | 63 | 64 | 65 | 66 | + +| [文件公告](http://www.caam.org.cn/chn/1/cate_67/list_1.html) | [文件公告 - 协会文件](http://www.caam.org.cn/chn/1/cate_68/list_1.html) | [文件公告 - 公示公告](http://www.caam.org.cn/chn/1/cate_69/list_1.html) | [文件公告 - 会议通知](http://www.caam.org.cn/chn/1/cate_70/list_1.html) | [文件公告 - 分支机构文件](http://www.caam.org.cn/chn/1/cate_71/list_1.html) | [专题子站](http://www.caam.org.cn/chn/1/cate_72/list_1.html) | +| ------------------------------------------------------------ | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------ | +| 67 | 68 | 69 | 70 | 71 | 72 | + +| [专题子站 - 网站专题](http://www.caam.org.cn/chn/1/cate_73/list_1.html) | [专题子站 - 分支机构网站](http://www.caam.org.cn/chn/1/cate_74/list_1.html) | [专题子站 - 子网站](http://www.caam.org.cn/chn/1/cate_75/list_1.html) | [信息资料](http://www.caam.org.cn/chn/1/cate_76/list_1.html) | [信息资料 - 信息资料](http://www.caam.org.cn/chn/1/cate_77/list_1.html) | [信息资料 - 当前最热](http://www.caam.org.cn/chn/1/cate_78/list_1.html) | +| ----------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| 73 | 74 | 75 | 76 | 77 | 78 | + +| [行业动态](http://www.caam.org.cn/chn/1/cate_79/list_1.html) | [行业动态 - 政府资讯](http://www.caam.org.cn/chn/1/cate_80/list_1.html) | [行业动态 - 企业新闻](http://www.caam.org.cn/chn/1/cate_81/list_1.html) | [行业动态 - 行业动态](http://www.caam.org.cn/chn/1/cate_82/list_1.html) | [行业动态 - 车市动态](http://www.caam.org.cn/chn/1/cate_83/list_1.html) | [行业动态 - 国内召回](http://www.caam.org.cn/chn/1/cate_84/list_1.html) | +| ------------------------------------------------------------ | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| 79 | 80 | 81 | 82 | 83 | 84 | + +| [行业动态 - 国外召回](http://www.caam.org.cn/chn/1/cate_85/list_1.html) | [行业动态 - 汽车新技术](http://www.caam.org.cn/chn/1/cate_86/list_1.html) | [行业动态 - 市场环境](http://www.caam.org.cn/chn/1/cate_87/list_1.html) | [行业动态 - 国际动态](http://www.caam.org.cn/chn/1/cate_88/list_1.html) | [行业动态 - 国际动态 - 新闻](http://www.caam.org.cn/chn/1/cate_89/list_1.html) | [行业动态 - 国际动态 - 企业](http://www.caam.org.cn/chn/1/cate_90/list_1.html) | +| ----------------------------------------------------------------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| 85 | 86 | 87 | 88 | 89 | 90 | + +| [行业动态 - 产品资讯](http://www.caam.org.cn/chn/1/cate_91/list_1.html) | [行业动态 - 相关行业](http://www.caam.org.cn/chn/1/cate_92/list_1.html) | [行业政策](http://www.caam.org.cn/chn/1/cate_93/list_1.html) | [行业政策 - 最新政策](http://www.caam.org.cn/chn/1/cate_95/list_1.html) | [行业政策 - 政策解读](http://www.caam.org.cn/chn/1/cate_96/list_1.html) | [行业政策 - 国家政策](http://www.caam.org.cn/chn/1/cate_97/list_1.html) | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| 91 | 92 | 93 | 95 | 96 | 97 | + +| [行业政策 - 国家政策 - 产业政策](http://www.caam.org.cn/chn/1/cate_98/list_1.html) | [行业政策 - 国家政策 - 新能源汽车](http://www.caam.org.cn/chn/1/cate_99/list_1.html) | [行业政策 - 国家政策 - 节能环保](http://www.caam.org.cn/chn/1/cate_100/list_1.html) | [行业政策 - 国家政策 - 税收](http://www.caam.org.cn/chn/1/cate_101/list_1.html) | [行业政策 - 国家政策 - 进出口](http://www.caam.org.cn/chn/1/cate_102/list_1.html) | [行业政策 - 国家政策 - 其他](http://www.caam.org.cn/chn/1/cate_103/list_1.html) | +| ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| 98 | 99 | 100 | 101 | 102 | 103 | + +| [行业政策 - 地方政策](http://www.caam.org.cn/chn/1/cate_104/list_1.html) | [行业政策 - 相关政策](http://www.caam.org.cn/chn/1/cate_105/list_1.html) | [行业政策 - 国外政策](http://www.caam.org.cn/chn/1/cate_106/list_1.html) | [行业政策 - 政策报道](http://www.caam.org.cn/chn/1/cate_107/list_1.html) | [标准法规](http://www.caam.org.cn/chn/1/cate_108/list_1.html) | [标准法规 - 标准政策](http://www.caam.org.cn/chn/1/cate_109/list_1.html) | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------- | ------------------------------------------------------------------------ | +| 104 | 105 | 106 | 107 | 108 | 109 | + +| [标准法规 - 国家标准](http://www.caam.org.cn/chn/1/cate_110/list_1.html) | [标准法规 - 行业标准](http://www.caam.org.cn/chn/1/cate_111/list_1.html) | [标准法规 - 标准动态](http://www.caam.org.cn/chn/1/cate_112/list_1.html) | [标准法规 - 国际标准](http://www.caam.org.cn/chn/1/cate_113/list_1.html) | [标准法规 - 标准资料](http://www.caam.org.cn/chn/1/cate_114/list_1.html) | [基础资料](http://www.caam.org.cn/chn/1/cate_115/list_1.html) | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------- | +| 110 | 111 | 112 | 113 | 114 | 115 | + +| [信息资料 - 公众资料](http://www.caam.org.cn/chn/1/cate_116/list_1.html) | [信息资料 - 成品油](http://www.caam.org.cn/chn/1/cate_117/list_1.html) | [信息资料 - 成品油 - 国内市场](http://www.caam.org.cn/chn/1/cate_118/list_1.html) | [信息资料 - 成品油 - 国际市场](http://www.caam.org.cn/chn/1/cate_119/list_1.html) | [信息资料 - 保有量](http://www.caam.org.cn/chn/1/cate_120/list_1.html) | [信息资料 - 公路交通](http://www.caam.org.cn/chn/1/cate_121/list_1.html) | +| ------------------------------------------------------------------------ | ---------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------ | +| 116 | 117 | 118 | 119 | 120 | 121 | + +| [信息资料 - 公路交通 - 公路客运量](http://www.caam.org.cn/chn/1/cate_122/list_1.html) | [信息资料 - 公路交通 - 旅客周转量](http://www.caam.org.cn/chn/1/cate_123/list_1.html) | [信息资料 - 公路交通 - 公路货运量](http://www.caam.org.cn/chn/1/cate_124/list_1.html) | [信息资料 - 经济环境](http://www.caam.org.cn/chn/1/cate_125/list_1.html) | [公告查询](http://www.caam.org.cn/chn/1/cate_126/list_1.html) | [公告查询 - 公告批文](http://www.caam.org.cn/chn/1/cate_127/list_1.html) | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------- | ------------------------------------------------------------------------ | +| 122 | 123 | 124 | 125 | 126 | 127 | + +| [公告查询 - 公示公告](http://www.caam.org.cn/chn/1/cate_128/list_1.html) | [公告查询 - 节能与新能源](http://www.caam.org.cn/chn/1/cate_129/list_1.html) | [公告查询 - 公告动态](http://www.caam.org.cn/chn/1/cate_130/list_1.html) | [人物访谈](http://www.caam.org.cn/chn/1/cate_131/list_1.html) | [人物访谈 - 访谈列表](http://www.caam.org.cn/chn/1/cate_132/list_1.html) | [视频新闻](http://www.caam.org.cn/chn/1/cate_133/list_1.html) | +| ------------------------------------------------------------------------ | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------- | +| 128 | 129 | 130 | 131 | 132 | 133 | + +| [视频新闻 - 热门视频](http://www.caam.org.cn/chn/1/cate_134/list_1.html) | [视频新闻 - 推荐视频](http://www.caam.org.cn/chn/1/cate_135/list_1.html) | [视频新闻 - 视频列表](http://www.caam.org.cn/chn/1/cate_136/list_1.html) | [统计数据 - 欧洲 - 俄罗斯](http://www.caam.org.cn/chn/1/cate_137/list_1.html) | [统计数据 - 欧洲 - 爱尔兰](http://www.caam.org.cn/chn/1/cate_138/list_1.html) | [统计数据 - 欧洲 - 丹麦](http://www.caam.org.cn/chn/1/cate_139/list_1.html) | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| 134 | 135 | 136 | 137 | 138 | 139 | + +| [统计数据 - 欧洲 - 其他](http://www.caam.org.cn/chn/1/cate_140/list_1.html) | [统计数据 - 大洋洲 - 其他](http://www.caam.org.cn/chn/1/cate_141/list_1.html) | [统计数据 - 北美洲 - 加拿大](http://www.caam.org.cn/chn/1/cate_142/list_1.html) | [统计数据 - 北美洲 - 其他](http://www.caam.org.cn/chn/1/cate_144/list_1.html) | [统计数据 - 北美洲 - 墨西哥](http://www.caam.org.cn/chn/1/cate_143/list_1.html) | [统计数据 - 非洲 - 南非](http://www.caam.org.cn/chn/1/cate_145/list_1.html) | +| --------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| 140 | 141 | 142 | 144 | 143 | 145 | + +| [统计数据 - 非洲 - 其他](http://www.caam.org.cn/chn/1/cate_146/list_1.html) | [协会概况 - 分支机构 - 机构名单](http://www.caam.org.cn/chn/1/cate_147/list_1.html) | [首页 - 轮播](http://www.caam.org.cn/chn/1/cate_148/list_1.html) | [标准法规 - 标准政策 - 轮播](http://www.caam.org.cn/chn/1/cate_149/list_1.html) | [信息资料 - 信息资料 - 轮播](http://www.caam.org.cn/chn/1/cate_150/list_1.html) | [行业动态 - 行业资讯 - 轮播](http://www.caam.org.cn/chn/1/cate_151/list_1.html) | +| --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| 146 | 147 | 148 | 149 | 150 | 151 | + +| [行业政策 - 行业政策 - 轮播](http://www.caam.org.cn/chn/1/cate_152/list_1.html) | [协会工作 - 协会工作 - 轮播图](http://www.caam.org.cn/chn/1/cate_153/list_1.html) | [统计数据 - 数据统计 - 轮播图](http://www.caam.org.cn/chn/1/cate_154/list_1.html) | [Home](http://www.caam.org.cn/chn/1/cate_155/list_1.html) | [Home - Focus News](http://www.caam.org.cn/chn/1/cate_156/list_1.html) | [Home - Overview](http://www.caam.org.cn/chn/1/cate_157/list_1.html) | +| ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------- | ---------------------------------------------------------------------- | -------------------------------------------------------------------- | +| 152 | 153 | 154 | 155 | 156 | 157 | + +| [Home - News](http://www.caam.org.cn/chn/1/cate_158/list_1.html) | [Home - Member sign](http://www.caam.org.cn/chn/1/cate_161/list_1.html) | [车桥分会](http://www.caam.org.cn/chn/1/cate_162/list_1.html) | [上市公司委员会](http://www.caam.org.cn/chn/1/cate_183/list_1.html) | [上市公司委员会 - 单位动态](http://www.caam.org.cn/chn/1/cate_184/list_1.html) | [上市公司委员会 - 临时公告](http://www.caam.org.cn/chn/1/cate_185/list_1.html) | +| ---------------------------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| 158 | 161 | 162 | 183 | 184 | 185 |`, + name: '分类', maintainers: ['nczitzk'], handler, }; diff --git a/lib/routes/caixin/blog.ts b/lib/routes/caixin/blog.ts index ce118899b..29f4674b3 100644 --- a/lib/routes/caixin/blog.ts +++ b/lib/routes/caixin/blog.ts @@ -23,7 +23,7 @@ export const route: Route = { supportScihub: false, }, name: '用户博客', - maintainers: [], + maintainers: ['Maecenas'], handler, description: '通过提取文章全文,以提供比官方源更佳的阅读体验.', }; diff --git a/lib/routes/cas/genetics/index.ts b/lib/routes/cas/genetics/index.ts index 9b0330d9c..9bd8db3cd 100644 --- a/lib/routes/cas/genetics/index.ts +++ b/lib/routes/cas/genetics/index.ts @@ -8,9 +8,19 @@ const baseUrl = 'https://genetics.cas.cn'; export const route: Route = { path: '/genetics/:path{.+}', - name: 'Unknown', - maintainers: [], + categories: ['university'], + example: '/cas/genetics/jixs/yg', + parameters: { path: '路径,可在 URL 找到' }, + name: '遗传与发育生物学研究所', + maintainers: ['panyq357'], handler, + description: `| 路径 | 栏目 | +| :--------------------- | :--------- | +| jixs/yg | 学术预告 | +| dtxw/kyjz | 科研进展 | +| edu/zsxx/ssszs\\_187556 | 硕士生招生 | +| edu/zsxx/bsszs\\_187557 | 博士生招生 | +| dqyd/djgz/dwyw | 党委要闻 |`, }; async function handler(ctx) { diff --git a/lib/routes/cas/is/index.ts b/lib/routes/cas/is/index.ts index ec7390918..f977aaca8 100644 --- a/lib/routes/cas/is/index.ts +++ b/lib/routes/cas/is/index.ts @@ -9,9 +9,15 @@ const baseUrl = 'https://is.cas.cn'; export const route: Route = { path: '/is/:path{.+}', - name: 'Unknown', - maintainers: [], + categories: ['university'], + example: '/cas/is/xwdt2016/tzgg2016', + parameters: { path: '路径,可在 URL 找到' }, + name: '软件研究所', + maintainers: ['Misaka13514'], handler, + description: `| 通知公告 | 科技动态 | 科普动态 | +| ----------------- | ----------------- | ----------------- | +| xwdt2016/tzgg2016 | xwdt2016/kjdt2016 | kxcb2016/kpdt2016 |`, }; async function handler(ctx) { diff --git a/lib/routes/cbaigui/index.ts b/lib/routes/cbaigui/index.ts index b07d49142..b415738b6 100644 --- a/lib/routes/cbaigui/index.ts +++ b/lib/routes/cbaigui/index.ts @@ -1,7 +1,6 @@ import { load } from 'cheerio'; import type { Route } from '@/types'; -import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -9,9 +8,17 @@ import { renderFigure } from './templates/figure'; import { apiSlug, GetFilterId, rootUrl } from './utils'; export const route: Route = { - path: '*', - name: 'Unknown', - maintainers: [], + path: '/:path{.+}?', + categories: ['new-media'], + example: '/cbaigui', + parameters: { path: '路径,默认为首页' }, + name: '通用', + maintainers: ['nczitzk'], + description: `若订阅 [标签:妖](https://www.cbaigui.com/post-tag/妖),网址为 \`https://www.cbaigui.com/post-tag/妖\`。截取 \`https://www.cbaigui.com\` 到末尾的部分 \`/post-tag/妖\` 作为参数,此时路由为 [\`/cbaigui/post-tag/妖\`](https://rsshub.app/cbaigui/post-tag/妖)。 + +若订阅 [分类:埃及](https://www.cbaigui.com/post-category/世界/非洲/埃及),网址为 \`https://www.cbaigui.com/post-category/世界/非洲/埃及\`。截取 \`https://www.cbaigui.com\` 到末尾的部分 \`/post-category/世界/非洲/埃及\` 作为参数,此时路由为 [\`/cbaigui/post-category/世界/非洲/埃及\`](https://rsshub.app/cbaigui/post-category/世界/非洲/埃及)。 + +若订阅 [词条:白泽图](https://www.cbaigui.com/post-category/词条/白泽图),网址为 \`https://www.cbaigui.com/post-category/词条/白泽图\`。截取 \`https://www.cbaigui.com\` 到末尾的部分 \`/post-category/词条/白泽图\` 作为参数,此时路由为 [\`/cbaigui/post-category/词条/白泽图\`](https://rsshub.app/cbaigui/post-category/词条/白泽图)。`, handler, }; @@ -20,13 +27,14 @@ async function handler(ctx) { let filterName; - const currentUrl = new URL(getSubPath(ctx).replace(/^\/cbaigui/, ''), rootUrl).href; + const path = ctx.req.param('path') ?? ''; + const currentUrl = new URL(`/${path}`, rootUrl).href; let apiUrl = new URL(`${apiSlug}/posts?_embed=true&per_page=${limit}`, rootUrl).href; - const filterMatches = getSubPath(ctx).match(/^\/post-(tag|category)\/(.*)$/); + const filterMatches = path.match(/^post-(tag|category)\/(.*)$/); if (filterMatches) { - filterName = decodeURI(filterMatches[2].split('/').pop()); + filterName = filterMatches[2].split('/').pop(); const filterType = filterMatches[1] === 'tag' ? 'tags' : 'categories'; const filterId = await GetFilterId(filterType, filterName); diff --git a/lib/routes/cbnweek/index.ts b/lib/routes/cbnweek/index.ts index 9b2474be1..c323849b8 100644 --- a/lib/routes/cbnweek/index.ts +++ b/lib/routes/cbnweek/index.ts @@ -5,13 +5,15 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/', + categories: ['finance'], + example: '/cbnweek', radar: [ { source: ['cbnweek.com/'], target: '', }, ], - name: 'Unknown', + name: '首页', maintainers: ['nczitzk'], handler, url: 'cbnweek.com/', diff --git a/lib/routes/cebbank/all.tsx b/lib/routes/cebbank/all.tsx index cd6c59cc2..76aaaf520 100644 --- a/lib/routes/cebbank/all.tsx +++ b/lib/routes/cebbank/all.tsx @@ -11,7 +11,6 @@ export const route: Route = { path: '/quotation/all', categories: ['other'], example: '/cebbank/quotation/all', - parameters: {}, features: { requireConfig: false, requirePuppeteer: false, @@ -25,7 +24,7 @@ export const route: Route = { source: ['cebbank.com/site/ygzx/whpj/index.html', 'cebbank.com/eportal/ui', 'cebbank.com/'], }, ], - name: 'Unknown', + name: '外汇牌价 - 总览', maintainers: ['linbuxiao'], handler, url: 'cebbank.com/site/ygzx/whpj/index.html', diff --git a/lib/routes/cfmmc/index.ts b/lib/routes/cfmmc/index.ts index faa2a6a24..1e6cb87f3 100644 --- a/lib/routes/cfmmc/index.ts +++ b/lib/routes/cfmmc/index.ts @@ -8,9 +8,62 @@ import timezone from '@/utils/timezone'; export const route: Route = { path: '/:id{.+}?', - name: 'Unknown', - maintainers: [], + categories: ['finance'], + example: '/cfmmc/main/noticeannouncement/cfmmcnotice', + parameters: { id: '栏目 id,见下表,默认为中国期货监控公告' }, + radar: [ + { + source: ['cfmmc.com/:id'], + target: (params) => `/cfmmc${params.id ? `/${params.id.replace(/\/index\.shtml/, '')}` : ''}`, + }, + ], + name: '栏目', + maintainers: ['nczitzk'], handler, + description: `#### 党的建设 + +| 栏目 | id | +| -------- | -------------------------------------- | +| 党建动态 | main/partybuilding/partybuildingtrends | +| 基层风采 | main/partybuilding/basestyle | +| 学习园地 | main/partybuilding/learninggarden | + +#### 通知公告 + +| 栏目 | id | +| ---------------- | ----------------------------------- | +| 中国期货监控公告 | main/noticeannouncement/cfmmcnotice | +| 证监会公告 | main/noticeannouncement/csrcnotice | +| 上期所公告 | main/noticeannouncement/shfenotice | +| 郑商所公告 | main/noticeannouncement/czcenotice | +| 大商所公告 | main/noticeannouncement/dcenotice | +| 中金所公告 | main/noticeannouncement/cffexnotice | +| 广期所公告 | main/noticeannouncement/gfexnotice | + +#### 焦点新闻 + +| 栏目 | id | +| -------- | -------------------------------- | +| 财经要闻 | main/focusnews/financialnews | +| 专题聚焦 | main/focusnews/thematicfocus | +| 金融动态 | main/focusnews/financialdynamics | + +#### 保障基金 + +| 栏目 | id | +| -------- | ------------------------------------- | +| 基金概况 | main/securityfund/fundoverview | +| 政策法规 | main/securityfund/policiesregulations | +| 公告信息 | main/securityfund/noticeinformation | + +#### 政策法规 + +| 栏目 | id | +| -------------------- | --------------------------------------------- | +| 国家法律法规 | main/policiesregulations/lawsregulations | +| 部门规章及规范性文件 | main/policiesregulations/regulationsnormative | +| 行业法规政策 | main/policiesregulations/industrypolicies | +| 中国期货监控相关规则 | main/policiesregulations/cfmmcrules |`, }; async function handler(ctx) { diff --git a/lib/routes/chaincatcher/home.tsx b/lib/routes/chaincatcher/home.tsx index ad89be87a..7c394ac3b 100644 --- a/lib/routes/chaincatcher/home.tsx +++ b/lib/routes/chaincatcher/home.tsx @@ -11,13 +11,15 @@ const rootUrl = 'https://www.chaincatcher.com'; export const route: Route = { path: '/', + categories: ['new-media'], + example: '/chaincatcher', radar: [ { source: ['chaincatcher.com/'], target: '', }, ], - name: 'Unknown', + name: '首页', maintainers: ['TonyRL'], handler, url: 'chaincatcher.com/', diff --git a/lib/routes/chinafactcheck/index.ts b/lib/routes/chinafactcheck/index.ts index 75d1721a7..efe5326ea 100644 --- a/lib/routes/chinafactcheck/index.ts +++ b/lib/routes/chinafactcheck/index.ts @@ -8,13 +8,15 @@ import utils from './utils'; export const route: Route = { path: '/', + categories: ['other'], + example: '/chinafactcheck', radar: [ { source: ['chinafactcheck.com/'], target: '', }, ], - name: 'Unknown', + name: '最新文章列表', maintainers: ['kdanfly'], handler, url: 'chinafactcheck.com/', diff --git a/lib/routes/chinanews/index.ts b/lib/routes/chinanews/index.ts index 883131a78..1f2a9d3a1 100644 --- a/lib/routes/chinanews/index.ts +++ b/lib/routes/chinanews/index.ts @@ -10,13 +10,15 @@ const rootUrl = 'https://www.chinanews.com.cn'; export const route: Route = { path: '/', + categories: ['traditional-media'], + example: '/chinanews', radar: [ { source: ['chinanews.com.cn/'], target: '', }, ], - name: 'Unknown', + name: '最新', maintainers: ['yuxinliu-alex'], handler, url: 'chinanews.com.cn/', diff --git a/lib/routes/chinawriter/index.ts b/lib/routes/chinawriter/index.ts index 87c61b8ec..ccd4f692f 100644 --- a/lib/routes/chinawriter/index.ts +++ b/lib/routes/chinawriter/index.ts @@ -8,8 +8,137 @@ import timezone from '@/utils/timezone'; export const route: Route = { path: '/:id{.+}?', - name: 'Unknown', - maintainers: [], + categories: ['new-media'], + example: '/chinawriter', + parameters: { id: '栏目 id,见下表,默认为首页' }, + description: `| 服务 | 文学奖项 | +| ------ | -------- | +| 403937 | 403973 | + +| 新闻 | 访谈 | 艺术 | +| ------ | ------ | ------ | +| 403990 | 403997 | 404002 | + +| 理论评论 | 文史 | 科幻 | 书汇 | 新作品 | +| -------- | ------ | ------ | ------ | ------ | +| 404029 | 404057 | 404078 | 404058 | 404015 | + +| 世界文坛 | 民族文艺 | 网络文学 | 儿童文学 | +| -------- | -------- | -------- | -------- | +| 404085 | 404086 | 404022 | 404059 | + +
+ 更多栏目 + +#### 会员 + +| 新发展会员名单 | 讣告 | +| -------------- | ------------- | +| 403978/403979 | 403978/403981 | + +#### 文学奖项 + +| 其他文学奖项 | +| ------------- | +| 403973/419349 | + +#### 新闻 + +| 时政新闻 | 中国作协 | 主席 | 党组书记 | 各地文讯 | +| ------------- | ------------- | ------------- | ------------- | ------------- | +| 403990/403991 | 403990/403993 | 403990/441519 | 403990/441520 | 403990/403994 | + +#### 艺术 + +| 新闻 | 影视 | 舞台 | 人物 | 展览 | 书画 | +| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | +| 404002/404003 | 404002/419388 | 404002/419389 | 404002/404005 | 404002/419390 | 404002/419391 | + +#### 理论评论 + +| 重要理论文章 | 理论热点 | 文学评论 | 创作谈 | 争鸣 | 综述 | 《中国当代文学研究》 | +| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | -------------------- | +| 404029/419350 | 404029/419351 | 404029/404030 | 404029/404032 | 404029/404033 | 404029/404034 | 404087/404988/425775 | + +#### 文史 + +| 文坛轶事 | 文史漫谈 | 重温经典 | 版本研究 | 名人手迹 | 茅盾文学奖获奖作家研究 | +| ------------- | ------------- | ------------- | ------------- | ------------- | ---------------------- | +| 404057/404063 | 404057/442005 | 404057/419384 | 404057/419387 | 404057/419382 | 404087/404988/429369 | + +#### 科幻 + +| 动态 | 评论 | 作家印象 | 作品 | 科声幻影 | +| ------------- | ------------- | ------------- | ------------- | ------------- | +| 404078/404079 | 404078/404080 | 404078/404081 | 404078/404083 | 404078/404084 | + +#### 书汇 + +| 书摘 | 图书排行 | +| ------------- | ------------- | +| 404058/404067 | 404058/404069 | + +#### 新作品 + +| 小说 | 诗歌 | 散文 | 纪实 | 其他 | +| ------------- | ------------- | ------------- | ------------- | ------------- | +| 404015/404017 | 404015/404020 | 404015/404018 | 404015/404019 | 404015/419926 | + +| 平台推荐 | 本周之星 | 2018 年 5 月 18 日前原创作品 | +| ------------- | ------------- | ---------------------------- | +| 404015/419789 | 404015/431511 | 404009 | + +| 《人民文学》 | 《诗刊》 | 《民族文学》 | 《收获》 | 《十月》 | +| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | +| 404015/416204/418925 | 404015/416204/418926 | 404015/416204/418928 | 404015/416204/418958 | 404015/416204/418956 | + +| 《小说选刊》 | 《北京文学》 | 《上海文学》 | 《天津文学》 | 《草原》 | +| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | +| 404015/416204/418929 | 404015/416204/418954 | 404015/416204/418962 | 404015/416204/419004 | 404015/416204/418989 | + +| 《黄河》 | 《江南》 | 《钟山》 | 《广州文艺》 | 《湖南文学》 | +| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | +| 404015/416204/426204 | 404015/416204/418957 | 404015/416204/418984 | 404015/416204/419881 | 404015/416204/419156 | + +| 《山西文学》 | 《花城》 | 《青年作家》 | 《雨花》 | 《红豆》 | +| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | +| 404015/416204/419827 | 404015/416204/418960 | 404015/416204/418967 | 404015/416204/419885 | 404015/416204/418993 | + +| 《长江文艺》 | 《中国作家》 | 《青年文学》 | 《美文》 | 《芙蓉》 | +| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | +| 404015/416204/418961 | 404015/416204/418927 | 404015/416204/418979 | 404015/416204/418985 | 404015/416204/418986 | + +| 《长城》 | 《福建文学》 | 《啄木鸟》 | 《芳草》 | 《小说月报》 | +| -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | +| 404015/416204/418987 | 404015/416204/419003 | 404015/416204/435225 | 404015/416204/424311 | 404015/416204/418963 | + +#### 世界文坛 + +| 视点 | 译介 | 作家印象 | 文学评论 | 影像艺术 | 作品推介 | +| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | +| 404085/404090 | 404085/431803 | 404085/404091 | 404085/404092 | 404085/404093 | 404085/404095 | + +#### 民族文艺 + +| 动态 | 品评 | 作家印象 | 作品 | 影像 | +| ------------- | ------------- | ------------- | ------------- | ------------- | +| 404086/404098 | 404086/404101 | 404086/404099 | 404086/404100 | 404086/404102 | + +#### 网络文学 + +| 动态 | 观察 | 访谈 | 中国网络小说排行榜 | +| ------------- | ------------- | ------------- | ------------------ | +| 404022/404023 | 404022/404027 | 404022/404024 | 404022/404028 | + +#### 儿童文学 + +| 视点 | 文学评论 | 作家印象 | 作品推介 | 动漫艺术 | +| ------------- | ------------- | ------------- | ------------- | ------------- | +| 404059/404071 | 404059/404072 | 404059/404073 | 404059/404075 | 404059/404076 | + +
`, + name: '栏目', + maintainers: ['nczitzk'], handler, }; diff --git a/lib/routes/cmde/index.ts b/lib/routes/cmde/index.ts index aa7173161..95eee1eff 100644 --- a/lib/routes/cmde/index.ts +++ b/lib/routes/cmde/index.ts @@ -10,9 +10,15 @@ const rootURL = 'https://www.cmde.org.cn'; export const route: Route = { path: '/:cate{.+}?', - name: 'Unknown', - maintainers: [], + categories: ['government'], + example: '/cmde/xwdt/zxyw', + parameters: { cate: '路径,默认为最新要闻' }, + name: '通用', + maintainers: ['run-ze'], handler, + description: `路径处填写对应页面 URL 中 \`https://www.cmde.org.cn/\` 与 \`/index.html\` 之间的字段,下面是一个例子。 + +若订阅 [最新要闻](https://www.cmde.org.cn/xwdt/zxyw/index.html) 则将对应页面 URL 中 \`https://www.cmde.org.cn/\` 和 \`/index.html\` 之间的字段 \`xwdt/zxyw\` 作为路径填入。此时路由为 [\`/cmde/xwdt/zxyw\`](https://rsshub.app/cmde/xwdt/zxyw)`, }; async function handler(ctx) { diff --git a/lib/routes/cncf/reports.ts b/lib/routes/cncf/reports.ts index 52400646c..45c5e040e 100644 --- a/lib/routes/cncf/reports.ts +++ b/lib/routes/cncf/reports.ts @@ -9,13 +9,15 @@ const rootURL = 'https://www.cncf.io'; export const route: Route = { path: '/reports', + categories: ['programming'], + example: '/cncf/reports', radar: [ { source: ['cncf.io/reports'], }, ], - name: 'Unknown', - maintainers: [], + name: 'Reports', + maintainers: ['Fatpandac'], handler, url: 'cncf.io/reports', }; diff --git a/lib/routes/cneb/yjxx.ts b/lib/routes/cneb/yjxx.ts index 5a56b9e57..a7fb54891 100644 --- a/lib/routes/cneb/yjxx.ts +++ b/lib/routes/cneb/yjxx.ts @@ -5,17 +5,49 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; export const route: Route = { - path: '/yjxx/*', + path: '/yjxx/:level?/:province?/:city?', + categories: ['forecast'], + example: '/cneb/yjxx', + parameters: { level: '灾害级别,见下表,默认为全部', province: '省份,默认为空,即全国', city: '城市,默认为空,即全省' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, radar: [ { source: ['cneb.gov.cn/yjxx', 'cneb.gov.cn/'], target: '/yjxx', }, ], - name: 'Unknown', - maintainers: [], + name: '预警信息', + maintainers: ['muzea', 'nczitzk'], handler, url: 'cneb.gov.cn/yjxx', + description: `灾害级别 + +| 全部 | 红色 | 橙色 | 黄色 | 蓝色 | +| ---- | ---- | ---- | ---- | ---- | +| | 红色 | 橙色 | 黄色 | 蓝色 | + +::: tip +若订阅全国的全部预警信息,此时路由为 [\`/cneb/yjxx\`](https://rsshub.app/cneb/yjxx)。 + +若订阅全国的 **红色** 预警信息,此时路由为 [\`/cneb/yjxx/红色\`](https://rsshub.app/cneb/yjxx/红色)。 + +若订阅 **北京市** 的全部预警信息,此时路由为 [\`/cneb/yjxx/北京市\`](https://rsshub.app/cneb/yjxx/北京市)。 + +若订阅 **北京市** 的 **蓝色** 预警信息,此时路由为 [\`/cneb/yjxx/北京市/蓝色\`](https://rsshub.app/cneb/yjxx/北京市/蓝色)。 + +若订阅 **广东省** 的 **橙色** 预警信息,此时路由为 [\`/cneb/yjxx/广东省/橙色\`](https://rsshub.app/cneb/yjxx/广东省/橙色)。 + +若订阅 **广东省广州市** 的全部预警信息,此时路由为 [\`/cneb/yjxx/广东省/广州市\`](https://rsshub.app/cneb/yjxx/广东省/广州市)。 + +若订阅 **广东省广州市** 的 **黄色** 预警信息,此时路由为 [\`/cneb/yjxx/广东省/广州市/黄色\`](https://rsshub.app/cneb/yjxx/广东省/广州市/黄色)。 +:::`, }; async function handler(ctx) { diff --git a/lib/routes/cnjxol/index.tsx b/lib/routes/cnjxol/index.tsx index c8dcb7fd5..043089275 100644 --- a/lib/routes/cnjxol/index.tsx +++ b/lib/routes/cnjxol/index.tsx @@ -2,9 +2,9 @@ import { load } from 'cheerio'; import { raw } from 'hono/html'; import { renderToString } from 'hono/jsx/dom/server'; -import InvalidParameterError from '@/errors/types/invalid-parameter'; import type { Route } from '@/types'; import cache from '@/utils/cache'; +import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -14,18 +14,46 @@ const categories = { }; export const route: Route = { - path: '/:category?/:id?', - name: 'Unknown', - maintainers: [], + path: '/jxrb/:id?', + categories: ['traditional-media'], + example: '/cnjxol/jxrb', + parameters: { id: '编号,见下表,默认为全部' }, + radar: [ + { + source: ['cnjxol.com/'], + target: '/jxrb/:id', + }, + ], + description: `| 版 | 编号 | +| -------------------- | ---- | +| 全部 | | +| 第 01 版:要闻 | 01 | +| 第 02 版:要闻 | 02 | +| 第 03 版:要闻 | 03 | +| 第 04 版:嘉一度 | 04 | +| 第 05 版:聚焦 | 05 | +| 第 06 版:党报热线 | 06 | +| 第 07 版:天下 | 07 | +| 第 08 版:聚焦 | 08 | +| 第 09 版:南湖新闻 | 09 | +| 第 10 版:综合 | 10 | +| 第 11 版:梅花洲 | 11 | +| 第 12 版:南湖纵横 | 12 | +| 第 13 版:秀洲新闻 | 13 | +| 第 14 版:综合 | 14 | +| 第 15 版:秀・观察 | 15 | +| 第 16 版:走进高新区 | 16 |`, + features: { + antiCrawler: true, + }, + name: '嘉兴日报', + maintainers: ['nczitzk'], handler, }; -async function handler(ctx) { - const category = ctx.req.param('category') ?? 'jxrb'; +export async function handler(ctx) { + const category = getSubPath(ctx).split('/', 2)[1]; const id = ctx.req.param('id'); - if (!Object.keys(categories).includes(category)) { - throw new InvalidParameterError('Invalid category'); - } const rootUrl = `https://${category}.cnjxol.com`; const currentUrl = `${rootUrl}/${category}Paper/pc/layout`; diff --git a/lib/routes/cnjxol/nhwb.ts b/lib/routes/cnjxol/nhwb.ts new file mode 100644 index 000000000..e88482d0b --- /dev/null +++ b/lib/routes/cnjxol/nhwb.ts @@ -0,0 +1,37 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/nhwb/:id?', + categories: ['traditional-media'], + example: '/cnjxol/nhwb', + parameters: { id: '编号,见下表,默认为全部' }, + radar: [ + { + source: ['cnjxol.com/'], + target: '/nhwb/:id', + }, + ], + description: `| 版 | 编号 | +| ------------------------------------ | ---- | +| 全部 | | +| 第 01 版:要闻 | 01 | +| 第 02 版:品质嘉兴・红船旁的美丽城镇 | 02 | +| 第 03 版:嘉兴新闻 | 03 | +| 第 04 版:嘉兴新闻 | 04 | +| 第 05 版:今日聚焦 | 05 | +| 第 06 版:嘉兴新闻 | 06 | +| 第 07 版:热线新闻 | 07 | +| 第 08 版:财经新闻 | 08 | +| 第 09 版:热线新闻 | 09 | +| 第 10 版:公益广告 | 10 | +| 第 11 版:消费周刊 | 11 | +| 第 12 版:悦读坊 | 12 |`, + features: { + antiCrawler: true, + }, + name: '南湖晚报', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/codeforces/recent-actions.ts b/lib/routes/codeforces/recent-actions.ts index 867350429..67f9173fe 100644 --- a/lib/routes/codeforces/recent-actions.ts +++ b/lib/routes/codeforces/recent-actions.ts @@ -23,7 +23,7 @@ export const route: Route = { }, ], name: 'Recent actions', - maintainers: [], + maintainers: ['ftiasch'], handler, url: 'codeforces.com/recent-actions', }; diff --git a/lib/routes/cpuid/news.ts b/lib/routes/cpuid/news.ts index 08c2cee9b..46b436403 100644 --- a/lib/routes/cpuid/news.ts +++ b/lib/routes/cpuid/news.ts @@ -25,7 +25,7 @@ export const route: Route = { }, ], name: 'News', - maintainers: [], + maintainers: ['TonyRL'], handler, url: 'cpuid.com/news.html', }; diff --git a/lib/routes/cs/index.ts b/lib/routes/cs/index.ts index 85b4e998d..5690d6954 100644 --- a/lib/routes/cs/index.ts +++ b/lib/routes/cs/index.ts @@ -16,8 +16,170 @@ const decodeBufferByCharset = (buffer) => { export const route: Route = { path: '/:category{.+}?', + categories: ['finance'], + example: '/cs', name: '栏目', - parameters: { category: '分类,见下表,默认为首页' }, + parameters: { category: '分类,见下表,默认为要闻' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + title: '要闻', + source: ['cs.com.cn/xwzx/'], + target: '/xwzx', + }, + { + title: '公司', + source: ['cs.com.cn/ssgs/'], + target: '/ssgs', + }, + { + title: '市场', + source: ['cs.com.cn/gppd/'], + target: '/gppd', + }, + { + title: '基金', + source: ['cs.com.cn/tzjj/'], + target: '/tzjj', + }, + { + title: '科创', + source: ['cs.com.cn/5g/'], + target: '/5g', + }, + { + title: '产经', + source: ['cs.com.cn/cj2020/'], + target: '/cj2020', + }, + { + title: '期货', + source: ['cs.com.cn/zzqh2020/'], + target: '/zzqh2020', + }, + { + title: '海外', + source: ['cs.com.cn/hw2020/'], + target: '/hw2020', + }, + { + title: '财经要闻', + source: ['cs.com.cn/xwzx/hg/'], + target: '/xwzx/hg', + }, + { + title: '观点评论', + source: ['cs.com.cn/xwzx/jr/'], + target: '/xwzx/jr', + }, + { + title: '民生消费', + source: ['cs.com.cn/xwzx/msxf/'], + target: '/xwzx/msxf', + }, + { + title: '公司要闻', + source: ['cs.com.cn/ssgs/gsxw/'], + target: '/ssgs/gsxw', + }, + { + title: '公司深度', + source: ['cs.com.cn/ssgs/gssd/'], + target: '/ssgs/gssd', + }, + { + title: '公司巡礼', + source: ['cs.com.cn/ssgs/gsxl/'], + target: '/ssgs/gsxl', + }, + { + title: 'A股市场', + source: ['cs.com.cn/gppd/gsyj/'], + target: '/gppd/gsyj', + }, + { + title: '港股资讯', + source: ['cs.com.cn/gppd/ggzx/'], + target: '/gppd/ggzx', + }, + { + title: '债市研究', + source: ['cs.com.cn/gppd/zqxw/'], + target: '/gppd/zqxw', + }, + { + title: '海外报道', + source: ['cs.com.cn/gppd/hwbd/'], + target: '/gppd/hwbd', + }, + { + title: '期货报道', + source: ['cs.com.cn/gppd/qhbd/'], + target: '/gppd/qhbd', + }, + { + title: '基金动态', + source: ['cs.com.cn/tzjj/jjdt/'], + target: '/tzjj/jjdt', + }, + { + title: '基金视点', + source: ['cs.com.cn/tzjj/jjks/'], + target: '/tzjj/jjks', + }, + { + title: '基金持仓', + source: ['cs.com.cn/tzjj/jjcs/'], + target: '/tzjj/jjcs', + }, + { + title: '私募基金', + source: ['cs.com.cn/tzjj/smjj/'], + target: '/tzjj/smjj', + }, + { + title: '基民学苑', + source: ['cs.com.cn/tzjj/tjdh/'], + target: '/tzjj/tjdh', + }, + { + title: '券商', + source: ['cs.com.cn/qs/'], + target: '/qs', + }, + { + title: '银行', + source: ['cs.com.cn/yh/'], + target: '/yh', + }, + { + title: '保险', + source: ['cs.com.cn/bx/'], + target: '/bx', + }, + { + title: '中证快讯 7x24', + source: ['cs.com.cn/sylm/jsbd/'], + target: '/sylm/jsbd', + }, + { + title: 'IPO鉴真', + source: ['cs.com.cn/yc/ipojz/'], + target: '/yc/ipojz', + }, + { + title: '公司能见度', + source: ['cs.com.cn/yc/gsnjd/'], + target: '/yc/gsnjd', + }, + ], maintainers: ['nczitzk'], description: `| 要闻 | 公司 | 市场 | 基金 | | ---- | ---- | ---- | ---- | @@ -68,6 +230,7 @@ export const route: Route = { `, handler, + url: 'www.cs.com.cn', }; async function handler(ctx) { diff --git a/lib/routes/cs/zzkx.ts b/lib/routes/cs/zzkx.ts deleted file mode 100644 index 9faf0397e..000000000 --- a/lib/routes/cs/zzkx.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { Route } from '@/types'; - -export const route: Route = { - path: ['/news/zzkx', '/zzkx'], - name: 'Unknown', - maintainers: [], - handler, -}; - -function handler(ctx) { - // https://www.cs.com.cn/sylm/jsbd/ - - const redirectTo = '/cs/sylm/jsbd'; - ctx.set('redirect', redirectTo); -} diff --git a/lib/routes/curiouscat/user.ts b/lib/routes/curiouscat/user.ts index 36972528f..531a0b5a6 100644 --- a/lib/routes/curiouscat/user.ts +++ b/lib/routes/curiouscat/user.ts @@ -9,12 +9,15 @@ const fetchAPIByUser = async (user) => { export const route: Route = { path: '/user/:id', + categories: ['social-media'], + example: '/curiouscat/user/username', + parameters: { id: 'username that is in the URL' }, radar: [ { source: ['curiouscat.live/:id'], }, ], - name: 'Unknown', + name: 'User', maintainers: ['lucasew'], handler, }; diff --git a/lib/routes/cyzone/author.ts b/lib/routes/cyzone/author.ts index 760055725..15fd2449d 100644 --- a/lib/routes/cyzone/author.ts +++ b/lib/routes/cyzone/author.ts @@ -21,7 +21,7 @@ export const route: Route = { }, ], name: '作者', - maintainers: ['nczitzk'], + maintainers: ['xyqfer', 'nczitzk'], handler, }; diff --git a/lib/routes/cyzone/index.ts b/lib/routes/cyzone/index.ts index c359bdb18..c21349813 100644 --- a/lib/routes/cyzone/index.ts +++ b/lib/routes/cyzone/index.ts @@ -3,14 +3,25 @@ import type { Route } from '@/types'; import { apiRootUrl, getInfo, processItems, rootUrl } from './util'; export const route: Route = { - path: ['/channel/:id?', '/:id?'], + path: '/:id?', + categories: ['new-media'], + example: '/cyzone', + parameters: { id: '频道 id,可在对应频道页 URL 中找到,默认为 news,即最新资讯' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, radar: [ { source: ['cyzone.cn/channel/:id', 'cyzone.cn/'], target: '/:id', }, ], - name: 'Unknown', + name: '资讯', maintainers: ['nczitzk'], handler, description: `| 最新 | 快鲤鱼 | 创投 | 科创板 | 汽车 | diff --git a/lib/routes/cyzone/label.ts b/lib/routes/cyzone/label.ts index 55fae5981..1e1a4c0e7 100644 --- a/lib/routes/cyzone/label.ts +++ b/lib/routes/cyzone/label.ts @@ -21,7 +21,7 @@ export const route: Route = { }, ], name: '标签', - maintainers: ['nczitzk'], + maintainers: ['LogicJake', 'nczitzk'], handler, }; diff --git a/lib/routes/dayanzai/index.ts b/lib/routes/dayanzai/index.ts index dfd56492f..6b2f00205 100644 --- a/lib/routes/dayanzai/index.ts +++ b/lib/routes/dayanzai/index.ts @@ -28,7 +28,7 @@ export const route: Route = { }, ], name: '分类', - maintainers: [], + maintainers: ['gl0zzy'], handler, description: `| 微软应用 | 安卓应用 | 教程资源 | 其他资源 | | -------- | -------- | -------- | -------- | diff --git a/lib/routes/deadline/posts.tsx b/lib/routes/deadline/posts.tsx index 0d285abb2..d2b0f010b 100644 --- a/lib/routes/deadline/posts.tsx +++ b/lib/routes/deadline/posts.tsx @@ -26,13 +26,15 @@ const renderDescription = (embedded, desc) => export const route: Route = { path: '/', + categories: ['new-media'], + example: '/deadline', radar: [ { source: ['deadline.com/'], target: '', }, ], - name: 'Unknown', + name: 'Latest Article', maintainers: ['TonyRL'], handler, url: 'deadline.com/', diff --git a/lib/routes/dgjyw/index.ts b/lib/routes/dgjyw/index.ts index 57b3c5c0b..a3f6a3db3 100644 --- a/lib/routes/dgjyw/index.ts +++ b/lib/routes/dgjyw/index.ts @@ -2,23 +2,42 @@ import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; -import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; export const route: Route = { - path: '*', - name: 'Unknown', - maintainers: [], + path: '/:category{.+}?', + categories: ['study'], + example: '/dgjyw/tz', + parameters: { category: '分类,见下表,默认为通知' }, + radar: [ + { + source: ['www.dgjyw.com/:category.htm'], + target: '/:category', + }, + ], + name: '分类', + maintainers: ['nczitzk'], + description: `| 通知 | 动态 | 公示 | +| ---- | ---- | ---- | +| tz | dt | gs | + +::: tip +分类字段处填写的是对应东莞教研网网址中介于 \`https://www.dgjyw.com/\` 和 \`.htm\` 中间的一段。 + +如 [通知](https://www.dgjyw.com/tz.htm) 的网址为 \`https://www.dgjyw.com/tz.htm\`,其中间字段为 \`tz\`,所以可得路由为 [\`/dgjyw/tz\`](https://rsshub.app/dgjyw/tz); + +同理,[教育科研 - 科研文件](https://www.dgjyw.com/jyky/kywj.htm) 的网址为 \`https://www.dgjyw.com/jyky/kywj.htm\`,其中间字段为 \`jyky/kywj\`,所以可得路由为 [\`/dgjyw/jyky/kywj\`](https://rsshub.app/dgjyw/jyky/kywj)。 +:::`, handler, }; async function handler(ctx) { - const params = getSubPath(ctx); + const category = ctx.req.param('category') ?? 'tz'; const rootUrl = 'https://www.dgjyw.com'; - const currentUrl = `${rootUrl}${params === '/' ? '/tz' : params}.htm`; + const currentUrl = `${rootUrl}/${category}.htm`; const response = await got(currentUrl); diff --git a/lib/routes/digitalcameraworld/news.ts b/lib/routes/digitalcameraworld/news.ts index 7955857e4..ee36113ab 100644 --- a/lib/routes/digitalcameraworld/news.ts +++ b/lib/routes/digitalcameraworld/news.ts @@ -24,7 +24,7 @@ export const route: Route = { }, ], name: 'News', - maintainers: ['EthanWng97'], + maintainers: ['IvanWng97'], handler, }; diff --git a/lib/routes/discourse/notifications.ts b/lib/routes/discourse/notifications.ts index 189c16c1b..a98824841 100644 --- a/lib/routes/discourse/notifications.ts +++ b/lib/routes/discourse/notifications.ts @@ -24,7 +24,7 @@ export const route: Route = { supportScihub: false, }, name: 'Notifications', - maintainers: [], + maintainers: ['dzx-dzx'], handler, description: `::: warning If you opt to enable \`fulltext\` feature, consider adding \`limit\` parameter to your query to avoid sending too many request. diff --git a/lib/routes/discuz/discuz.ts b/lib/routes/discuz/discuz.ts index cd1e59c37..c73e86227 100644 --- a/lib/routes/discuz/discuz.ts +++ b/lib/routes/discuz/discuz.ts @@ -79,9 +79,19 @@ async function loadContent(itemLink, charset, header) { export const route: Route = { path: ['/:ver{[7x]}/:cid{[0-9]{2}}/:link{.+}', '/:ver{[7x]}/:link{.+}', '/:link{.+}'], - name: 'Unknown', - maintainers: ['pseudoyu'], + categories: ['bbs'], + example: '/discuz/x/https%3a%2f%2fwww.52pojie.cn%2fforum-16-1.html', + parameters: { + ver: 'discuz version,see below table', + cid: 'Cookie id,require self hosted and set environment parameters, see Deploy - Configuration pages for detail', + link: 'link of subforum, require url encoded', + }, + name: '通用子版块', + maintainers: ['junfengP', 'pseudoyu'], handler, + description: `| Discuz X Series | Discuz 7.x Series | +| --------------- | ----------------- | +| x | 7 |`, }; async function handler(ctx) { diff --git a/lib/routes/distill/index.ts b/lib/routes/distill/index.ts index 022f54bbf..ad4d16ffb 100644 --- a/lib/routes/distill/index.ts +++ b/lib/routes/distill/index.ts @@ -7,13 +7,15 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/', + categories: ['programming'], + example: '/distill', radar: [ { source: ['distill.pub/'], target: '', }, ], - name: 'Unknown', + name: 'Latest', maintainers: ['nczitzk'], handler, url: 'distill.pub/', diff --git a/lib/routes/dlsite/z-index/index.ts b/lib/routes/dlsite/z-index/index.ts index 7f0fb90b8..690b6d803 100644 --- a/lib/routes/dlsite/z-index/index.ts +++ b/lib/routes/dlsite/z-index/index.ts @@ -3,9 +3,21 @@ import type { Route } from '@/types'; import { ProcessItems } from '../utils'; export const route: Route = { - path: '*', - name: 'Unknown', - maintainers: [], + path: '/:path{.+}?', + categories: ['anime'], + example: '/dlsite/home/new', + parameters: { + path: 'Path, `/home/new` by default, as Release Calendar', + }, + description: `::: tip +To subscribe to this route, you can first visit the site and specify filters, and then fill in the field after \`https://www.dlsite.com/\` in the URL of the corresponding page at the path of the route. Here are 2 examples. + +If you subscribe to [Voice / ASMR works Release date - New to Old](https://www.dlsite.com/home/works/type/=/work_type_category/audio/order/release_d), at the URL of the corresponding page \`https://www.dlsite.com/home/works/type/=/work_type_category/audio/order/release_d\` and after \`https://www.dlsite.com/\` is \`home/works/type/=/work_type_category/audio/order/release_d\`, which can be seen as the path. In this case the route is [\`/dlsite/home/works/type/=/work_type_category/audio/order/release_d\`](https://rsshub.app/dlsite/home/works/type/=/work_type_category/audio/order/release_d) + +If you subscribe to [Discounted works Latest Discounts - Newest to Oldest](https://www.dlsite.com/home/works/discount/=/order/cstart_d), at the URL of the corresponding page \`https://www.dlsite.com/home/works/discount/=/order/cstart_d\` and after \`https://www.dlsite.com/\` is \`home/works/discount/=/order/cstart_d\`, which can be seen as the path. In this case the route is [\`/dlsite/home/works/discount/=/order/cstart_d\`](https://rsshub.app/dlsite/home/works/discount/=/order/cstart_d) +:::`, + name: 'General', + maintainers: ['nczitzk'], handler, features: { nsfw: true, diff --git a/lib/routes/douban/other/explore-column.ts b/lib/routes/douban/other/explore-column.ts index 5f0955aa2..15ecfa686 100644 --- a/lib/routes/douban/other/explore-column.ts +++ b/lib/routes/douban/other/explore-column.ts @@ -6,8 +6,11 @@ import got from '@/utils/got'; const host = 'https://www.douban.com/explore/column/'; export const route: Route = { path: '/explore/column/:id', - name: 'Unknown', - maintainers: [], + categories: ['social-media'], + example: '/douban/explore/column/2', + parameters: { id: '分栏目id' }, + name: '浏览发现分栏目', + maintainers: ['LogicJake'], handler, }; diff --git a/lib/routes/dut/index.ts b/lib/routes/dut/index.ts index 870fc93e1..c8eb01810 100644 --- a/lib/routes/dut/index.ts +++ b/lib/routes/dut/index.ts @@ -12,9 +12,30 @@ import shortcuts from './shortcuts'; export const route: Route = { path: ['/*/*', '/:0?'], - name: 'Unknown', - maintainers: [], + categories: ['university'], + example: '/dut', + name: '通用', + maintainers: ['beautyyuyanli', 'nczitzk', 'ueiu'], handler, + description: `订阅 **单级** 栏目如 [大连理工大学新闻网](https://news.dlut.edu.cn) 的 [头条关注](https://news.dlut.edu.cn/ttgz.htm) 分类栏目,分为 3 步: + +1. 将 URL \`https://news.dlut.edu.cn/ttgz.htm\` 中 \`https://\` 与 \`.dlut.edu.cn/\` 中间的 \`news\` 作为 \`site\` 参数填入; +2. 将 \`https://news.dlut.edu.cn/\` 与 \`.htm\` 间的 \`ttgz\` 作为 \`category\` 参数填入; +3. 最终可获得 [\`/dut/news/ttgz\`](https://rsshub.app/dut/news/tzgg)。 + +订阅 **多级** 栏目如 [大连理工大学新闻网](https://news.dlut.edu.cn) 的 [人才培养](https://news.dlut.edu.cn/xwjj01/rcpy.htm) 分类栏目,同样分为 3 步: + +1. 将 URL \`https://news.dlut.edu.cn/xwjj01/rcpy.htm\` 中 \`https://\` 与 \`.dlut.edu.cn/\` 中间的 \`news\` 作为 \`site\` 参数填入; +2. 把 \`https://news.dlut.edu.cn/\` 与 \`.htm\` 间 \`xwjj01/rcpy\` 作为 \`category\` 参数填入; +3. 最终可获得 [\`/dut/news/xwjj01/rcpy\`](https://rsshub.app/dut/news/xwjj01/rcpy)。 + +::: tip 小提示 +大连理工大学大部分站点支持上述通用规则进行订阅。下方的大连理工大学相关路由基本适用于该规则,在其对应的表格中没有提及的分类栏目,可以使用上方的方法自行扩展。 +::: + +::: tip 小小提示 +你会发现 [大连理工大学新闻网](https://news.dlut.edu.cn) 的 [人才培养](https://news.dlut.edu.cn/xwjj01/rcpy.htm) 分类栏目在下方 **新闻网** 参数表格中 \`category\` 参数为 \`rcpy\`,并非上面例子中给出的 \`xwjj01/rcpy\`。这意味着开发者对路由 \`/dut/news/xwjj01/rcpy\` 指定了快捷方式 \`/dut/news/rcpy\`。两者的效果是一致的。 +:::`, }; async function handler(ctx) { diff --git a/lib/routes/e-hentai/index.tsx b/lib/routes/e-hentai/index.tsx index fb5c2073a..6832229cc 100644 --- a/lib/routes/e-hentai/index.tsx +++ b/lib/routes/e-hentai/index.tsx @@ -3,22 +3,55 @@ import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; +import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { - path: '/:what?/:id?/:needTorrents?/:needImages?', - name: 'Unknown', - maintainers: [], + path: '/category/:category?/:needTorrents?/:needImages?', + categories: ['multimedia'], + example: '/e-hentai/category/manga', + parameters: { + category: '分类,可在对应分类页中找到,默认为首页', + needTorrents: '需要输出种子文件,填写 true/yes 表示需要,默认需要', + needImages: '需要显示大图,填写 true/yes 表示需要,默认需要', + }, + name: '分类', + maintainers: ['nczitzk'], + description: `::: tip +参数 **需要输出种子文件** 设置为 \`true\` \`yes\` \`t\` \`y\` 等值后,RSS 会携带种子文件的路径,以供支持 RSS 的下载工具订阅下载。 + +同理,参数 **需要显示大图** 启用后,RSS 会携带每项内容中的大图,而不只提供缩略图。 + +当然,选择 **需要输出种子文件**、**需要显示大图** 后获取内容时间需要更久,同时若指定获取数量过多,可能会出现获取超时错误。此时,可以在路由末尾处加上 \`?limit=限制获取数目\` 来限制获取条目数量,或直接修改全局的超时参数 \`REQUEST_TIMEOUT\`(详见文档中的 [其他应用配置](https://docs.rsshub.app/install/#pei-zhi-qi-ta-ying-yong-pei-zhi))。 + +以下是一个例子: + +选择浏览 [Manga 分类](https://e-hentai.org/manga),并指定 **不携带种子文件**,**只显示大图**,并只 **输出 5 个**。由于 [Manga 分类](https://e-hentai.org/manga) 的 URL \`https://e-hentai.org/manga\` 中对应分类字段为 \`manga\`,所以对应路由为 [\`/e-hentai/category/manga/no/yes?limit=5\`](https://rsshub.app/e-hentai/category/manga/no/yes?limit=5) +::: + +| Doujinshi | Manga | Artist CG | Game CG | Western | +| --------- | ----- | --------- | ------- | ------- | +| doujinshi | manga | artistcg | gamecg | western | + +| Non-H | Image Set | Cosplay | Asian Porn | Misc | Popular | +| ----- | --------- | ------- | ---------- | ---- | ------- | +| non-h | imageset | cosplay | asianporn | misc | popular |`, features: { nsfw: true, }, + radar: [ + { + source: ['e-hentai.org/:category', 'e-hentai.org/'], + target: '/category/:category', + }, + ], handler, }; -async function handler(ctx) { - const id = ctx.req.param('id') ?? ''; - const what = ctx.req.param('what') ?? ''; +export async function handler(ctx) { + const id = ctx.req.param('category') ?? ctx.req.param('tag') ?? ctx.req.param('keyword') ?? ''; + const what = getSubPath(ctx).split('/', 2)[1]; const needTorrents = /t|y/i.test(ctx.req.param('needTorrents') ?? 'true'); const needImages = /t|y/i.test(ctx.req.param('needImages') ?? 'true'); @@ -128,7 +161,7 @@ async function handler(ctx) { ); return { - title: `${id || what || 'Front Page'} - E-Hentai Galleries`, + title: `${id || what} - E-Hentai Galleries`, link: currentUrl, item: items, }; diff --git a/lib/routes/e-hentai/search.ts b/lib/routes/e-hentai/search.ts new file mode 100644 index 000000000..53bfab3be --- /dev/null +++ b/lib/routes/e-hentai/search.ts @@ -0,0 +1,31 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/search/:keyword?/:needTorrents?/:needImages?', + categories: ['multimedia'], + example: '/e-hentai/search/f_search=haha', + parameters: { + keyword: '关键字,可以在搜索结果页的 URL 中找到,默认为首页', + needTorrents: '需要输出种子文件,填写 true/yes 表示需要,默认需要', + needImages: '需要显示大图,填写 true/yes 表示需要,默认需要', + }, + features: { + nsfw: true, + }, + radar: [ + { + source: ['e-hentai.org/:keyword', 'e-hentai.org/'], + target: '/search/:keyword', + }, + ], + name: '搜索', + maintainers: ['nczitzk'], + description: `::: tip +参数 **需要输出种子文件**、**需要显示大图** 的说明同上,以下是一个例子: + +选择浏览 [f\\_search=cosplay 搜索结果](https://e-hentai.org/?f_search=cosplay),并指定 **携带种子文件**,且 **显示大图**。由于 [f\\_search=cosplay 搜索结果](https://e-hentai.org/?f_search=cosplay) 的 URL \`https://e-hentai.org/?f_search=cosplay\` 中对应关键字字段为 \`?\` 后的 \`f_search=cosplay\`,所以对应路由为 [\`/e-hentai/search/f_search=cosplay/y/y\`](https://rsshub.app/e-hentai/search/f_search=cosplay/y/y) +:::`, + handler, +}; diff --git a/lib/routes/e-hentai/tag.ts b/lib/routes/e-hentai/tag.ts new file mode 100644 index 000000000..112ebccf0 --- /dev/null +++ b/lib/routes/e-hentai/tag.ts @@ -0,0 +1,31 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/tag/:tag?/:needTorrents?/:needImages?', + categories: ['multimedia'], + example: '/e-hentai/tag/language:chinese', + parameters: { + tag: '标签,可在对应标签页中找到,默认为首页', + needTorrents: '需要输出种子文件,填写 true/yes 表示需要,默认需要', + needImages: '需要显示大图,填写 true/yes 表示需要,默认需要', + }, + features: { + nsfw: true, + }, + radar: [ + { + source: ['e-hentai.org/tag/:tag', 'e-hentai.org/'], + target: '/tag/:tag', + }, + ], + name: '标签', + maintainers: ['nczitzk'], + description: `::: tip +参数 **需要输出种子文件**、**需要显示大图** 的说明同上,以下是一个例子: + +选择浏览 [language:chinese 标签](https://e-hentai.org/tag/language:chinese),并指定 **携带种子文件**,**不显示大图**。由于 [language:chinese 标签](https://e-hentai.org/tag/language:chinese) 的 URL \`https://e-hentai.org/tag/language:chinese\` 中对应标签字段为 \`language:chinese\`,所以对应路由为 [\`/e-hentai/tag/language:chinese/true/false\`](https://rsshub.app/e-hentai/tag/language:chinese/true/false) +:::`, + handler, +}; diff --git a/lib/routes/elsevier/issue.ts b/lib/routes/elsevier/issue.ts index 08b89c6fb..46804f2d7 100644 --- a/lib/routes/elsevier/issue.ts +++ b/lib/routes/elsevier/issue.ts @@ -10,15 +10,21 @@ import { renderDescription } from './templates/description'; const cookieJar = new CookieJar(); export const route: Route = { - path: ['/:journal/vol/:issue', '/:journal/:issue'], + path: '/:journal/:issue', + categories: ['journal'], + example: '/elsevier/signal-processing/192', + parameters: { + journal: 'Journal Name, the part of the URL after `/journal/`', + issue: 'Release Number, the number in the URL after `/vol/` (If both Volume and Issue exist, must use the `Volume-Issue` form, e.g., `/elsevier/aace-clinical-case-reports/7-6`)', + }, radar: [ { - source: ['www.sciencedirect.com/journal/:journal/*'], - target: '/:journal', + source: ['www.sciencedirect.com/journal/:journal/vol/:issue'], + target: '/:journal/:issue', }, ], - name: 'Unknown', - maintainers: [], + name: 'Special Issue', + maintainers: ['Derekmini', 'sunwolf-swb'], handler, }; diff --git a/lib/routes/elsevier/journal.ts b/lib/routes/elsevier/journal.ts index c78999647..622b7d3e4 100644 --- a/lib/routes/elsevier/journal.ts +++ b/lib/routes/elsevier/journal.ts @@ -10,15 +10,20 @@ import { renderDescription } from './templates/description'; const cookieJar = new CookieJar(); export const route: Route = { - path: ['/:journal/latest', '/:journal'], + path: '/:journal', + categories: ['journal'], + example: '/elsevier/signal-processing', + parameters: { + journal: 'Journal Name, the part of the URL after `/journal/`', + }, radar: [ { source: ['www.sciencedirect.com/journal/:journal/*'], target: '/:journal', }, ], - name: 'Unknown', - maintainers: [], + name: 'Journal', + maintainers: ['Derekmini', 'sunwolf-swb'], handler, }; diff --git a/lib/routes/embassy/index.ts b/lib/routes/embassy/index.ts index e881792ec..d8aaee4f3 100644 --- a/lib/routes/embassy/index.ts +++ b/lib/routes/embassy/index.ts @@ -9,7 +9,13 @@ import supportedList from './supported-list'; export const route: Route = { path: '/:country/:city?', - name: 'Unknown', + categories: ['government'], + example: '/embassy/us/chicago', + parameters: { + country: '国家短代码, 见支持国家列表', + city: '城市, 对应国家列表下的`领事馆城市列表`,不填则为大使馆', + }, + name: '使领馆重要通知', maintainers: ['HenryQW'], handler, }; diff --git a/lib/routes/fda/cdrh.ts b/lib/routes/fda/cdrh.ts index 32c1b4d1d..8cdafc455 100644 --- a/lib/routes/fda/cdrh.ts +++ b/lib/routes/fda/cdrh.ts @@ -7,14 +7,17 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/cdrh/:titleOnly?', + categories: ['government'], + example: '/fda/cdrh', + parameters: { titleOnly: 'Title only, empty by default which includes the full text, any other value shows the title only' }, radar: [ { source: ['fda.gov/medical-devices/news-events-medical-devices/cdrhnew-news-and-updates', 'fda.gov/'], target: '/cdrh/:titleOnly', }, ], - name: 'Unknown', - maintainers: [], + name: 'CDRHNew', + maintainers: ['nczitzk'], handler, url: 'fda.gov/medical-devices/news-events-medical-devices/cdrhnew-news-and-updates', }; diff --git a/lib/routes/firefox/release.ts b/lib/routes/firefox/release.ts index 96b5c1495..232c2c891 100644 --- a/lib/routes/firefox/release.ts +++ b/lib/routes/firefox/release.ts @@ -14,8 +14,14 @@ const platformSlugs = { export const route: Route = { path: '/release/:platform?', - name: 'Unknown', - maintainers: [], + categories: ['program-update'], + example: '/firefox/release/desktop', + parameters: { platform: 'the platform' }, + description: `| Desktop | Android | Beta | Nightly | iOS | +| ------- | ------- | ---- | ------- | --- | +| desktop | android | beta | nightly | ios |`, + name: 'New Release', + maintainers: ['fengkx'], handler, }; diff --git a/lib/routes/fishshell/index.ts b/lib/routes/fishshell/index.ts index 9c6450fd3..b9433ba86 100644 --- a/lib/routes/fishshell/index.ts +++ b/lib/routes/fishshell/index.ts @@ -8,13 +8,15 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/', + categories: ['program-update'], + example: '/fishshell', radar: [ { source: ['fishshell.com/'], target: '', }, ], - name: 'Unknown', + name: 'Release Notes', maintainers: ['x2cf'], handler, url: 'fishshell.com/', diff --git a/lib/routes/fx-markets/channel.ts b/lib/routes/fx-markets/channel.ts index 9d8f74994..5a9b19fbc 100644 --- a/lib/routes/fx-markets/channel.ts +++ b/lib/routes/fx-markets/channel.ts @@ -19,7 +19,7 @@ export const route: Route = { supportScihub: false, }, name: 'Channel', - maintainers: [], + maintainers: ['mikkkee'], handler, description: `| Trading | Infrastructure | Tech and Data | Regulation | | ------- | -------------- | ------------- | ---------- | diff --git a/lib/routes/gamme/category.ts b/lib/routes/gamme/category.ts index c49830f28..2abbf9898 100644 --- a/lib/routes/gamme/category.ts +++ b/lib/routes/gamme/category.ts @@ -9,8 +9,14 @@ import { isValidHost } from '@/utils/valid-host'; export const route: Route = { path: '/:domain/:category?', - name: 'Unknown', - maintainers: [], + categories: ['new-media'], + example: '/gamme/news', + parameters: { + domain: '網站,`news` 為宅宅新聞,`sexynews` 為西斯新聞', + category: '分類名,可在 URL 找到,預設為全部', + }, + name: '分類', + maintainers: ['TonyRL'], handler, }; diff --git a/lib/routes/gamme/tag.ts b/lib/routes/gamme/tag.ts index c968f90d0..8b7234ac1 100644 --- a/lib/routes/gamme/tag.ts +++ b/lib/routes/gamme/tag.ts @@ -9,8 +9,14 @@ import { isValidHost } from '@/utils/valid-host'; export const route: Route = { path: '/:domain/tag/:tag', - name: 'Unknown', - maintainers: [], + categories: ['new-media'], + example: '/gamme/news/tag/歐派', + parameters: { + domain: '網站,`news` 為宅宅新聞,`sexynews` 為西斯新聞', + tag: '標籤,可在 URL 找到', + }, + name: '標籤', + maintainers: ['TonyRL'], handler, }; diff --git a/lib/routes/gdsrx/index.ts b/lib/routes/gdsrx/index.ts index 81e88bf27..4c374da64 100644 --- a/lib/routes/gdsrx/index.ts +++ b/lib/routes/gdsrx/index.ts @@ -19,7 +19,7 @@ export const route: Route = { supportScihub: false, }, name: '栏目', - maintainers: [], + maintainers: ['nczitzk'], handler, description: `| 栏目名称 | 栏目 id | | ----------------- | ------- | diff --git a/lib/routes/gelonghui/live.tsx b/lib/routes/gelonghui/live.tsx index 304f62f79..1c200884c 100644 --- a/lib/routes/gelonghui/live.tsx +++ b/lib/routes/gelonghui/live.tsx @@ -27,7 +27,7 @@ export const route: Route = { }, ], name: '实时快讯', - maintainers: [], + maintainers: ['TonyRL'], handler, url: 'gelonghui.com/live', }; diff --git a/lib/routes/genossenschaften/index.ts b/lib/routes/genossenschaften/index.ts index ac726a0d9..5a823597e 100644 --- a/lib/routes/genossenschaften/index.ts +++ b/lib/routes/genossenschaften/index.ts @@ -11,7 +11,7 @@ const PATH_PREFIX = '/genossenschaften/' as const; export const route: Route = { name: 'Immobiliensuche', - path: '*', + path: '/:path{.+}?', maintainers: ['sk22'], categories: ['other'], description: `Note that all parameters are optional and many can be specified multiple times @@ -39,6 +39,7 @@ filters, copy the part of the URL after the \`?\`. '&status=available&status=construction&status=planned' + '&type=residence&type=project', parameters: { + path: 'Query parameters copied from the search URL, without the leading `?`, composed of the parameters below', // labels are in german language because it's the same on the website cost: 'Miete bis (in €, number)', district: 'Bezirk (string, multiple)', @@ -62,7 +63,7 @@ filters, copy the part of the URL after the \`?\`. supportScihub: false, }, async handler(ctx) { - let path = ctx.req.path.slice(PATH_PREFIX.length); + let path = ctx.req.param('path') ?? ''; if (path.startsWith('&')) { // in case request url is something like `/genossenschaften/&cost=…` path = path.slice(1); diff --git a/lib/routes/gesiba/index.ts b/lib/routes/gesiba/index.ts index cebbc8b86..9c59d0ed0 100644 --- a/lib/routes/gesiba/index.ts +++ b/lib/routes/gesiba/index.ts @@ -1,7 +1,6 @@ import { load } from 'cheerio'; import type { Data, DataItem, Route } from '@/types'; -import { getSubPath } from '@/utils/common-utils'; import ofetch from '@/utils/ofetch'; const FEED_TITLE = 'Wohnungen - Gesiba' as const; @@ -16,7 +15,8 @@ const MAGIC_QUERY_PARAMS = export const route: Route = { name: 'Angebote', example: '/gesiba/verfuegbar=alle&plz[]=1100&plz[]=1120&size-from=45&size-to=80&rooms-from=2&rooms-to=3&betreuung=0', - path: '*', + path: '/:path{.+}?', + parameters: { path: 'Search filter parameters, see the description below' }, maintainers: ['sk22'], categories: ['other'], description: `Note that, on , filters are added to @@ -24,7 +24,7 @@ the URL like \`&filter[plz]=1100,1120\`, but the endpoint used here expects it like \`&plz[]=1100&plz[]=1120\`, if multiple values are passed to one parameter`, async handler(ctx) { - let params = getSubPath(ctx).slice(1); + let params = ctx.req.param('path') ?? ''; if (params.startsWith('&')) { params = params.slice(1); } diff --git a/lib/routes/getdr/index.ts b/lib/routes/getdr/index.ts index 296d65b62..51fd65184 100644 --- a/lib/routes/getdr/index.ts +++ b/lib/routes/getdr/index.ts @@ -7,13 +7,15 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/', + categories: ['new-media'], + example: '/getdr', radar: [ { source: ['getdr.com/'], target: '', }, ], - name: 'Unknown', + name: '最新詐騙情報', maintainers: ['nczitzk'], handler, url: 'getdr.com/', diff --git a/lib/routes/getitfree/index.ts b/lib/routes/getitfree/index.ts index fcbf6fd29..dd31e6956 100644 --- a/lib/routes/getitfree/index.ts +++ b/lib/routes/getitfree/index.ts @@ -1,20 +1,40 @@ import { load } from 'cheerio'; import type { Route } from '@/types'; +import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { apiSlug, bakeFilterSearchParams, bakeFiltersWithPair, bakeUrl, fetchData, getFilterNameForTitle, getFilterParamsForUrl, parseFilterStr, rootUrl } from './util'; export const route: Route = { - path: '/:filter{.+}?', - name: 'Unknown', - maintainers: [], + path: '/category/:id{.+}?', + categories: ['shopping'], + example: '/getitfree/category/pc', + parameters: { id: '分类,见下表,可在对应分类页中找到,默认为所有类别' }, + radar: [ + { + source: ['getitfree.cn/category/:id'], + target: '/category/:id', + }, + ], + name: '分类', + maintainers: ['sanmmm', 'nczitzk'], handler, + url: 'getitfree.cn', + description: `::: tip +可以叠加使用得到分类结果并集,如 [\`/getitfree/category/pc,android\`](https://rsshub.app/getitfree/category/pc,android) + +亦可与标签组合使用,如 [\`/getitfree/category/pc/tag/ai\`](https://rsshub.app/getitfree/category/pc/tag/ai) +::: + +| 所有类别 | Android | iOS | Mac | PC | UWP | 公告 | 永久免费 | 限时免费 | 正版折扣 | +| -------- | ------- | --- | --- | -- | --- | ------------ | -------- | -------- | -------- | +| | android | ios | mac | pc | uwp | notification | free | giveaway | discount |`, }; -async function handler(ctx) { - const filter = ctx.req.param('filter'); +export async function handler(ctx) { + const filter = getSubPath(ctx).slice(1); const limit = ctx.req.query('limit') ? Number(ctx.req.query('limit')) : 50; const filters = parseFilterStr(filter); diff --git a/lib/routes/getitfree/search.ts b/lib/routes/getitfree/search.ts new file mode 100644 index 000000000..948b3b908 --- /dev/null +++ b/lib/routes/getitfree/search.ts @@ -0,0 +1,24 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/search/:keyword', + categories: ['shopping'], + example: '/getitfree/search/windows', + parameters: { keyword: '关键字' }, + radar: [ + { + source: ['getitfree.cn/'], + target: (_, url) => { + const keyword = new URL(url).searchParams.get('s'); + + return `/getitfree/search${keyword ? `/${keyword}` : ''}`; + }, + }, + ], + name: '搜索', + maintainers: ['sanmmm', 'nczitzk'], + handler, + url: 'getitfree.cn', +}; diff --git a/lib/routes/getitfree/tag.ts b/lib/routes/getitfree/tag.ts new file mode 100644 index 000000000..ea2ce4b6e --- /dev/null +++ b/lib/routes/getitfree/tag.ts @@ -0,0 +1,68 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/tag/:id{.+}?', + categories: ['shopping'], + example: '/getitfree/tag/ai', + parameters: { id: '标签,见下表,可在对应标签页中找到,默认为所有标签' }, + radar: [ + { + source: ['getitfree.cn/tag/:id'], + target: '/tag/:id', + }, + ], + name: '标签', + maintainers: ['nczitzk'], + handler, + url: 'getitfree.cn', + description: `::: tip +可以叠加使用得到标签结果并集,如 [\`/getitfree/tag/ai,office\`](https://rsshub.app/getitfree/tag/ai,office) +::: + +| AI | Android | DVD | GIF | iCloud | +| -- | ------- | --- | --- | ------ | + +| ICON | iOS | iPhone | Leawo | Mac | +| ---- | --- | ------ | ----- | --- | + +| Markdown | OCR | Office | Office 办公 | PDF | +| -------- | --- | ------ | ----------- | --- | + +| PDF 转换 | Windows | 下载 | 书签管理 | 健康 | +| -------- | ------- | ---- | -------- | ---- | + +| 全平台 | 办公软件 | 加密保护 | 卸载 / 清理 / 优化 | 卸载清理 | +| ------ | -------- | -------- | ------------------ | -------- | + +| 图像处理 | 图片 / 编辑 / 管理 | 壁纸 | 备份 / 恢复 / 加密 | 备份恢复 | +| -------- | ------------------ | ---- | ------------------ | -------- | + +| 字体 | 学习 | 密码管理 | 导航 | 开始菜单 | +| ---- | ---- | -------- | ---- | -------- | + +| 录屏截图 | 影音 / 刻录 / 转换 | 投屏镜像 | 提醒 | 摄影 | +| -------- | ------------------ | -------- | ---- | ---- | + +| 播放器 | 收藏夹 | 效率工具 | 数据传输 | 数据恢复 | +| ------ | ------ | -------- | -------- | -------- | + +| 数据擦除 | 文件管理 | 文档 / 转换 / 压缩 | 文档扫描 | 日历 | +| -------- | -------- | ------------------ | -------- | ---- | + +| 杀毒防护 | 查重 | 正版特惠 | 水印 | 清理优化 | +| -------- | ---- | -------- | ---- | -------- | + +| 滤镜 | 硬件外设 | 硬盘 / 分区 / 驱动 | 硬盘检测 | 稍后阅读 | +| ---- | -------- | ------------------ | -------- | -------- | + +| 笔记 | 系统工具 | 素材 | 网络 / 安全 / 传输 | 网络安全 | +| ---- | -------- | ---- | ------------------ | -------- | + +| 色彩 | 视频剪辑 | 视频转换 | 记账 | 设计 | +| ---- | -------- | -------- | ---- | ---- | + +| 软件卸载 | 远程控制 | 音乐 | 音频 | 驱动 | +| -------- | -------- | ---- | ---- | ---- |`, +}; diff --git a/lib/routes/globallawreview/index.ts b/lib/routes/globallawreview/index.ts index 35386c6e1..0a032053b 100644 --- a/lib/routes/globallawreview/index.ts +++ b/lib/routes/globallawreview/index.ts @@ -5,13 +5,15 @@ import got from '@/utils/got'; export const route: Route = { path: '/', + categories: ['journal'], + example: '/globallawreview', radar: [ { source: ['globallawreview.org/Magazine/GetIssueContentList', 'globallawreview.org/'], target: '', }, ], - name: 'Unknown', + name: '期刊', maintainers: ['nczitzk'], handler, url: 'globallawreview.org/Magazine/GetIssueContentList', diff --git a/lib/routes/gocn/news.ts b/lib/routes/gocn/news.ts index 48cc00fe4..8dc36f507 100644 --- a/lib/routes/gocn/news.ts +++ b/lib/routes/gocn/news.ts @@ -5,8 +5,24 @@ import { parseDate } from '@/utils/parse-date'; import { renderHTML } from './utils'; export const route: Route = { - path: ['/', '/news'], - name: 'Unknown', + path: '/news', + categories: ['programming'], + example: '/gocn/news', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['gocn.vip/'], + }, + ], + name: '最新动态', maintainers: ['AtlanCI', 'CcccFz'], handler, url: 'gocn.vip/', diff --git a/lib/routes/gov/chongqing/gzw.ts b/lib/routes/gov/chongqing/gzw.ts index a3aa1c2b7..54ff1b105 100644 --- a/lib/routes/gov/chongqing/gzw.ts +++ b/lib/routes/gov/chongqing/gzw.ts @@ -8,6 +8,8 @@ import timezone from '@/utils/timezone'; export const route: Route = { path: '/gzw/:category{.+}?', + categories: ['government'], + example: '/gov/chongqing/gzw', parameters: { category: '分类,见下表,默认为通知公告', }, diff --git a/lib/routes/gov/mfa/wjdt.ts b/lib/routes/gov/mfa/wjdt.ts index 0ba270c50..0cdeb13e0 100644 --- a/lib/routes/gov/mfa/wjdt.ts +++ b/lib/routes/gov/mfa/wjdt.ts @@ -20,6 +20,11 @@ const categories = { export const route: Route = { path: '/wjdt/:category?', + categories: ['government'], + example: '/gov/mfa/wjdt/fyrbt', + parameters: { + category: '分类,见下表,默认为领导人活动', + }, name: '外交动态', maintainers: ['nicolaszf', 'nczitzk'], handler, diff --git a/lib/routes/gq/news.ts b/lib/routes/gq/news.ts index 67750f050..723d58d36 100644 --- a/lib/routes/gq/news.ts +++ b/lib/routes/gq/news.ts @@ -27,7 +27,7 @@ export const route: Route = { }, ], name: 'News', - maintainers: ['EthanWng97'], + maintainers: ['IvanWng97'], handler, }; diff --git a/lib/routes/grubstreet/index.ts b/lib/routes/grubstreet/index.ts index 890d4865a..08fa6aa6a 100644 --- a/lib/routes/grubstreet/index.ts +++ b/lib/routes/grubstreet/index.ts @@ -4,13 +4,15 @@ import utils from './utils'; export const route: Route = { path: '/', + categories: ['new-media'], + example: '/grubstreet', radar: [ { source: ['grubstreet.com/'], target: '', }, ], - name: 'Unknown', + name: 'Posts', maintainers: ['loganrockmore'], handler, url: 'grubstreet.com/', diff --git a/lib/routes/guancha/topic.ts b/lib/routes/guancha/topic.ts index f2dc57f51..9bd332799 100644 --- a/lib/routes/guancha/topic.ts +++ b/lib/routes/guancha/topic.ts @@ -7,16 +7,34 @@ import { parseRelativeDate } from '@/utils/parse-date'; export const route: Route = { path: '/topic/:id/:order?', + categories: ['new-media'], + example: '/guancha/topic/110/1', + parameters: { id: '话题 id,可在URL中找到,默认为全部,即为 `0`', order: '排序参数,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, radar: [ { source: ['guancha.cn/'], target: '/:category?', }, ], - name: 'Unknown', + name: '风闻话题', maintainers: ['occupy5', 'nczitzk'], handler, url: 'guancha.cn/', + description: `| 最新回复 | 最新发布 | 24 小时最热 | 3 天最热 | 7 天最热 | 3 个月最热 | 专栏文章 | +| -------- | -------- | ----------- | -------- | -------- | ---------- | -------- | +| 1 | 2 | 3 | 6 | 7 | 8 | 5 | + +::: tip +仅在话题 id 为 0,即选择 全部 时,**3 个月最热**、**24 小时最热**、**3 天最热**、**7 天最热** 和 **专栏文章** 参数生效。 +:::`, }; async function handler(ctx) { diff --git a/lib/routes/guanhai/index.ts b/lib/routes/guanhai/index.ts index 46382d7fb..33c6bc2c1 100644 --- a/lib/routes/guanhai/index.ts +++ b/lib/routes/guanhai/index.ts @@ -8,13 +8,15 @@ import timezone from '@/utils/timezone'; export const route: Route = { path: '/', + categories: ['new-media'], + example: '/guanhai', radar: [ { source: ['guanhai.com.cn/'], target: '', }, ], - name: 'Unknown', + name: '首页', maintainers: ['TonyRL'], handler, url: 'guanhai.com.cn/', diff --git a/lib/routes/hackertalk/index.ts b/lib/routes/hackertalk/index.ts index 6078c7bad..1a70af0bd 100644 --- a/lib/routes/hackertalk/index.ts +++ b/lib/routes/hackertalk/index.ts @@ -8,13 +8,15 @@ const md = MarkdownIt(); export const route: Route = { path: '/', + categories: ['bbs'], + example: '/hackertalk', radar: [ { source: ['hackertalk.net/'], target: '', }, ], - name: 'Unknown', + name: '最新帖子', maintainers: ['hyoban'], handler, url: 'hackertalk.net/', diff --git a/lib/routes/hackyournews/index.ts b/lib/routes/hackyournews/index.ts index 099825763..4f3dbba12 100644 --- a/lib/routes/hackyournews/index.ts +++ b/lib/routes/hackyournews/index.ts @@ -7,13 +7,15 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/', + categories: ['programming'], + example: '/hackyournews', radar: [ { source: ['hackyournews.com/'], target: '', }, ], - name: 'Unknown', + name: 'Index', maintainers: ['ftiasch'], handler, url: 'hackyournews.com/', diff --git a/lib/routes/hafu/news.ts b/lib/routes/hafu/news.ts index a384ce3ff..762e221b7 100644 --- a/lib/routes/hafu/news.ts +++ b/lib/routes/hafu/news.ts @@ -16,7 +16,7 @@ export const route: Route = { supportScihub: false, }, name: '河南财政金融学院', - maintainers: [], + maintainers: ['deep1nlife'], handler, description: `| 校内公告通知 | 教务处公告通知 | 招生就业处公告通知 | | ------------ | -------------- | ------------------ | diff --git a/lib/routes/hinatazaka46/blog.ts b/lib/routes/hinatazaka46/blog.ts index 9be7b64f7..ba47f46cd 100644 --- a/lib/routes/hinatazaka46/blog.ts +++ b/lib/routes/hinatazaka46/blog.ts @@ -20,7 +20,7 @@ export const route: Route = { supportScihub: false, }, name: 'Hinatazaka46 Blog 日向坂 46 博客', - maintainers: [], + maintainers: ['yj-qin', 'AkashiGakki'], handler, description: `Member ID diff --git a/lib/routes/hinatazaka46/news.ts b/lib/routes/hinatazaka46/news.ts index f9873fe6d..ad40cb59b 100644 --- a/lib/routes/hinatazaka46/news.ts +++ b/lib/routes/hinatazaka46/news.ts @@ -24,7 +24,7 @@ export const route: Route = { }, ], name: 'Hinatazaka46 News 日向坂 46 新闻', - maintainers: ['crispgm', 'akashigakki'], + maintainers: ['crispgm', 'AkashiGakki'], handler, url: 'hinatazaka46.com/s/official/news/list', }; diff --git a/lib/routes/hk01/channel.ts b/lib/routes/hk01/channel.ts index 80d28867b..becc5283a 100644 --- a/lib/routes/hk01/channel.ts +++ b/lib/routes/hk01/channel.ts @@ -5,13 +5,16 @@ import { apiRootUrl, ProcessItems, rootUrl } from './utils'; export const route: Route = { path: '/channel/:id?', + categories: ['new-media'], + example: '/hk01/channel/391', + parameters: { id: '子栏目 id, 可在 URL 中找到' }, radar: [ { source: ['hk01.com/channel/:id', 'hk01.com/'], }, ], - name: 'Unknown', - maintainers: [], + name: '子栏目', + maintainers: ['hoilc', 'Fatpandac', 'nczitzk'], handler, }; diff --git a/lib/routes/hk01/issue.ts b/lib/routes/hk01/issue.ts index 01aadcc38..6d95b3b47 100644 --- a/lib/routes/hk01/issue.ts +++ b/lib/routes/hk01/issue.ts @@ -5,13 +5,16 @@ import { apiRootUrl, ProcessItems, rootUrl } from './utils'; export const route: Route = { path: '/issue/:id?', + categories: ['new-media'], + example: '/hk01/issue/649', + parameters: { id: '专题 id, 可在 URL 中找到' }, radar: [ { source: ['hk01.com/issue/:id', 'hk01.com/'], }, ], - name: 'Unknown', - maintainers: [], + name: '专题', + maintainers: ['hoilc', 'Fatpandac', 'nczitzk'], handler, }; diff --git a/lib/routes/hk01/tag.ts b/lib/routes/hk01/tag.ts index 34b7bed10..5bb4d3bf7 100644 --- a/lib/routes/hk01/tag.ts +++ b/lib/routes/hk01/tag.ts @@ -5,13 +5,16 @@ import { apiRootUrl, ProcessItems, rootUrl } from './utils'; export const route: Route = { path: '/tag/:id?', + categories: ['new-media'], + example: '/hk01/tag/2787', + parameters: { id: '标签 id, 可在 URL 中找到' }, radar: [ { source: ['hk01.com/tag/:id', 'hk01.com/'], }, ], - name: 'Unknown', - maintainers: [], + name: '标签', + maintainers: ['hoilc', 'Fatpandac', 'nczitzk'], handler, }; diff --git a/lib/routes/hk01/zone.ts b/lib/routes/hk01/zone.ts index 04bfc7f70..0f6628b58 100644 --- a/lib/routes/hk01/zone.ts +++ b/lib/routes/hk01/zone.ts @@ -5,13 +5,16 @@ import { apiRootUrl, ProcessItems, rootUrl } from './utils'; export const route: Route = { path: '/zone/:id?', + categories: ['new-media'], + example: '/hk01/zone/11', + parameters: { id: '栏目 id, 可在 URL 中找到' }, radar: [ { source: ['hk01.com/zone/:id', 'hk01.com/'], }, ], - name: 'Unknown', - maintainers: [], + name: '栏目', + maintainers: ['hoilc', 'Fatpandac', 'nczitzk'], handler, }; diff --git a/lib/routes/hkjunkcall/index.ts b/lib/routes/hkjunkcall/index.ts index b8b1f9eae..5646b135e 100644 --- a/lib/routes/hkjunkcall/index.ts +++ b/lib/routes/hkjunkcall/index.ts @@ -7,13 +7,15 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/', + categories: ['new-media'], + example: '/hkjunkcall', radar: [ { source: ['hkjunkcall.com/'], target: '', }, ], - name: 'Unknown', + name: '近期資訊', maintainers: ['nczitzk'], handler, url: 'hkjunkcall.com/', diff --git a/lib/routes/hongkong/chp.ts b/lib/routes/hongkong/chp.ts index 28a0f6ad7..792298fb1 100644 --- a/lib/routes/hongkong/chp.ts +++ b/lib/routes/hongkong/chp.ts @@ -40,15 +40,29 @@ const titles = { export const route: Route = { path: '/chp/:category?/:language?', + categories: ['government'], + example: '/hongkong/chp', + parameters: { category: 'Category, see below, Important Topics by default', language: 'Language, see below, zh_tw by default' }, radar: [ { source: ['dh.gov.hk/'], }, ], - name: 'Unknown', + name: 'Category', maintainers: ['nczitzk'], handler, url: 'dh.gov.hk/', + description: `Category + +| Important Topics | Press Releases | Response Level | Periodicals & Publications | Health Notice | +| ---------------- | ------------------ | -------------- | -------------------------- | ------------- | +| important\\_ft | press\\_data\\_index | ResponseLevel | publication | HealthAlert | + +Language + +| English | 中文简体 | 中文繁體 | +| ------- | -------- | -------- | +| en | zh\\_cn | zh\\_tw |`, }; async function handler(ctx) { diff --git a/lib/routes/hostmonit/cloudflareyesv6.ts b/lib/routes/hostmonit/cloudflareyesv6.ts deleted file mode 100644 index ca54d6dc5..000000000 --- a/lib/routes/hostmonit/cloudflareyesv6.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { Route } from '@/types'; - -export const route: Route = { - path: '/cloudflareyesv6', - name: 'Unknown', - maintainers: [], - handler, -}; - -function handler(ctx) { - ctx.set('redirect', '/hostmonit/cloudflareyes/v6'); -} diff --git a/lib/routes/hrbeu/gx/card.ts b/lib/routes/hrbeu/gx/card.ts index 4788b3841..100fe8b18 100644 --- a/lib/routes/hrbeu/gx/card.ts +++ b/lib/routes/hrbeu/gx/card.ts @@ -8,8 +8,14 @@ const rootUrl = 'http://news.hrbeu.edu.cn'; export const route: Route = { path: '/gx/card/:column/:id?', - name: 'Unknown', - maintainers: [], + categories: ['university'], + example: '/hrbeu/gx/card/xw/ztch', + parameters: { + column: '主栏,如 `新闻:xw`,由 `URL` 中获取;', + id: '次栏,如 `要闻:yw`,如果次栏存在,则为必选,由 `URL` 中获取。', + }, + name: '工学新闻 - 卡片页面', + maintainers: ['Derekmini', 'XYenon'], handler, }; diff --git a/lib/routes/hrbeu/gx/list.ts b/lib/routes/hrbeu/gx/list.ts index 8e00e8332..38e1ddd71 100644 --- a/lib/routes/hrbeu/gx/list.ts +++ b/lib/routes/hrbeu/gx/list.ts @@ -9,8 +9,14 @@ const rootUrl = 'http://news.hrbeu.edu.cn'; export const route: Route = { path: '/gx/list/:column/:id?', - name: 'Unknown', - maintainers: [], + categories: ['university'], + example: '/hrbeu/gx/list/xw/yw', + parameters: { + column: '主栏,如 `新闻:xw`,由 `URL` 中获取;', + id: '次栏,如 `要闻:yw`,如果次栏存在,则为必选,由 `URL` 中获取。', + }, + name: '工学新闻 - 列表页面', + maintainers: ['Derekmini', 'XYenon'], handler, }; diff --git a/lib/routes/hrbeu/uae/news.ts b/lib/routes/hrbeu/uae/news.ts index 10c955609..0bf761fb0 100644 --- a/lib/routes/hrbeu/uae/news.ts +++ b/lib/routes/hrbeu/uae/news.ts @@ -25,7 +25,7 @@ export const route: Route = { }, ], name: '水声工程学院', - maintainers: [], + maintainers: ['Derekmini'], handler, description: `| 新闻动态 | 通知公告 | 科学研究 / 科研动态 | | :------: | :------: | :-----------------: | diff --git a/lib/routes/hunau/gfxy/index.ts b/lib/routes/hunau/gfxy/index.ts index c5ab543db..bd92b7ce3 100644 --- a/lib/routes/hunau/gfxy/index.ts +++ b/lib/routes/hunau/gfxy/index.ts @@ -22,7 +22,7 @@ export const route: Route = { }, ], name: '公共管理与法学学院', - maintainers: [], + maintainers: ['lcandy2'], handler, url: 'xky.hunau.edu.cn/', description: `| 分类 | 通知公告 | 学院新闻 | 其他分类通知... | diff --git a/lib/routes/hunau/jwc.ts b/lib/routes/hunau/jwc.ts index 9a6142490..6ea970bc9 100644 --- a/lib/routes/hunau/jwc.ts +++ b/lib/routes/hunau/jwc.ts @@ -22,7 +22,7 @@ export const route: Route = { }, ], name: '教务处', - maintainers: [], + maintainers: ['lcandy2'], handler, url: 'xky.hunau.edu.cn/', description: `| 分类 | 通知公告 | 教务动态 | 其他教务通知... | diff --git a/lib/routes/hunau/xky/index.ts b/lib/routes/hunau/xky/index.ts index f74660428..a299c954a 100644 --- a/lib/routes/hunau/xky/index.ts +++ b/lib/routes/hunau/xky/index.ts @@ -22,7 +22,7 @@ export const route: Route = { }, ], name: '信息与智能科学学院', - maintainers: [], + maintainers: ['lcandy2'], handler, url: 'xky.hunau.edu.cn/', description: `| 分类 | 通知公告 | 学院新闻 | 其他分类通知... | diff --git a/lib/routes/ielts/index.ts b/lib/routes/ielts/index.ts index 52ca7ed59..d177968d5 100644 --- a/lib/routes/ielts/index.ts +++ b/lib/routes/ielts/index.ts @@ -12,13 +12,15 @@ const targetUrl = 'https://ielts.neea.cn/allnews?locale=zh_CN'; export const route: Route = { path: '/', + categories: ['study'], + example: '/ielts', radar: [ { source: ['ielts.neea.cn/allnews'], target: '', }, ], - name: 'Unknown', + name: '最新消息', maintainers: ['zenxds'], handler, url: 'ielts.neea.cn/allnews', diff --git a/lib/routes/ifeng/news.tsx b/lib/routes/ifeng/news.tsx index a509209f7..b3e2205a2 100644 --- a/lib/routes/ifeng/news.tsx +++ b/lib/routes/ifeng/news.tsx @@ -4,23 +4,31 @@ import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; import cache from '@/utils/cache'; -import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; export const route: Route = { - path: '/news/*', - name: 'Unknown', - maintainers: [], + path: '/news/:path{.+}?', + categories: ['new-media'], + example: '/ifeng/news', + parameters: { path: '路径,对应分类资讯页 URL 路径,默认为空' }, + name: '资讯', + maintainers: ['nczitzk'], handler, + description: `::: tip +路径处填写对应页面 URL 中 \`https://news.ifeng.com/\` 后的字段。下面是一个例子。 + +若订阅 [大湾区\\_资讯\\_凤凰网](https://news.ifeng.com/shanklist/3-305565-) 则将对应页面 URL \`https://news.ifeng.com/shanklist/3-305565-\` 中 \`https://news.ifeng.com/\` 后的字段 \`shanklist/3-305565-\` 作为路径填入。此时路由为 [\`/ifeng/news/shanklist/3-305565-\`](https://rsshub.app/ifeng/news/shanklist/3-305565-) +:::`, }; async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 20; + const path = ctx.req.param('path'); const rootUrl = 'https://news.ifeng.com'; - const currentUrl = `${rootUrl}${getSubPath(ctx).replace(/^\/news/, '')}`; + const currentUrl = `${rootUrl}${path ? `/${path}` : ''}`; const response = await got({ method: 'get', diff --git a/lib/routes/ifi-audio/download.ts b/lib/routes/ifi-audio/download.ts index d6b61b991..0e1522818 100644 --- a/lib/routes/ifi-audio/download.ts +++ b/lib/routes/ifi-audio/download.ts @@ -19,7 +19,7 @@ export const route: Route = { supportScihub: false, }, name: 'Download Hub', - maintainers: ['EthanWng97'], + maintainers: ['IvanWng97'], handler, description: `::: warning diff --git a/lib/routes/iiilab/index.ts b/lib/routes/iiilab/index.ts index ac3235e07..0c773ea29 100644 --- a/lib/routes/iiilab/index.ts +++ b/lib/routes/iiilab/index.ts @@ -5,13 +5,15 @@ const baseUrl = 'https://www.iiilab.com/'; export const route: Route = { path: '/', + categories: ['new-media'], + example: '/iiilab', radar: [ { source: ['www.iiilab.com/'], target: '', }, ], - name: 'Unknown', + name: '发现', maintainers: ['Joey'], handler, url: 'www.iiilab.com/', diff --git a/lib/routes/inoreader/index.ts b/lib/routes/inoreader/index.ts index 205f46248..bb49e64f3 100644 --- a/lib/routes/inoreader/index.ts +++ b/lib/routes/inoreader/index.ts @@ -8,10 +8,11 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/html_clip/:user/:tag', example: '/inoreader/html_clip/1005137674/user-favorites', + parameters: { user: 'User id, can be found in the HTML clip URL', tag: 'Tag name, can be found in the HTML clip URL' }, categories: ['reading'], view: ViewType.Articles, name: 'HTML Clip', - maintainers: ['EthanWng97'], + maintainers: ['IvanWng97'], handler, }; diff --git a/lib/routes/inoreader/rss.ts b/lib/routes/inoreader/rss.ts index c19c420a5..ee02e90b1 100644 --- a/lib/routes/inoreader/rss.ts +++ b/lib/routes/inoreader/rss.ts @@ -19,7 +19,7 @@ export const route: Route = { supportScihub: false, }, name: 'RSS', - maintainers: ['EthanWng97'], + maintainers: ['IvanWng97'], handler, }; diff --git a/lib/routes/iqilu/program.ts b/lib/routes/iqilu/program.ts index 47d794d10..bb87acbc4 100644 --- a/lib/routes/iqilu/program.ts +++ b/lib/routes/iqilu/program.ts @@ -9,8 +9,33 @@ import { renderDescription } from './templates/description'; export const route: Route = { path: '/v/:category{.+}?', - name: 'Unknown', - maintainers: [], + categories: ['traditional-media'], + example: '/iqilu/v/sdws/sdxwlb', + parameters: { + category: '节目 id,可在对应节目页 URL 中找到,见下表,默认为 `sdws/sdxwlb`,即山东新闻联播', + }, + features: { + supportPodcast: true, + }, + name: '电视节目', + maintainers: ['nczitzk'], + description: `| 节目名称 | 节目 id | +| ---------------- | -------------- | +| 山东新闻联播 | sdws/sdxwlb | +| 闪电大视野 | ggpd/sddsy | +| 山东三农新闻联播 | nkpd/snxw | +| 每日新闻 | qlpd/mrxw | +| 新闻午班车 | ggpd/xwwbc | +| 戏宇宙 | sdws/xyz/ | +| 中国礼 中国乐 | qlpd/zglzgy | +| 超级语文课 | sdws/cjywk | +| 文物里的山东 | yspd/wwldsd | +| 拉呱 | qlpd/l0 | +| 生活帮 | shpd/shb | +| 快乐大赢家 | zypd/kldyj | +| 乡村季风 | nkpd/xcjf | +| 健康是 1 | ggpd/jks1 | +| 此时此刻 | sdws/cishicike |`, handler, }; diff --git a/lib/routes/itch/index.ts b/lib/routes/itch/index.ts index 9ca5eb3ca..c225ccc0d 100644 --- a/lib/routes/itch/index.ts +++ b/lib/routes/itch/index.ts @@ -2,21 +2,30 @@ import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; -import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { renderDescription } from './templates/description'; export const route: Route = { - path: '*', - name: 'Unknown', - maintainers: [], + path: '/:path{.+}?', + categories: ['game'], + example: '/itch/games/new-and-popular/featured', + parameters: { path: 'Params' }, + name: 'Browse', + maintainers: ['nczitzk'], + description: `The path is the field after \`itch.io\` in the URL of the corresponding page, e.g. the URL of [Top Rated Games tagged Singleplayer](https://itch.io/games/top-rated/tag-singleplayer) is \`https://itch.io/games/top-rated/tag-singleplayer\`, where the field after \`itch.io\` is \`/games/top-rated/tag-singleplayer\`. + +So the route is [\`/itch/games/top-rated/tag-singleplayer\`](https://rsshub.app/itch/games/top-rated/tag-singleplayer). + +::: tip +You can browse all the tags [here](https://itch.io/tags). +:::`, handler, }; async function handler(ctx) { const rootUrl = 'https://itch.io'; - const currentUrl = `${rootUrl}${getSubPath(ctx)}`; + const currentUrl = `${rootUrl}/${ctx.req.param('path') ?? ''}`; const response = await got({ method: 'get', diff --git a/lib/routes/javdb/lists.ts b/lib/routes/javdb/lists.ts index 83a09d64f..972122360 100644 --- a/lib/routes/javdb/lists.ts +++ b/lib/routes/javdb/lists.ts @@ -4,16 +4,34 @@ import utils from './utils'; export const route: Route = { path: '/lists/:id/:filter?/:sort?', + categories: ['multimedia'], + example: '/javdb/lists/2GPgB', + parameters: { + id: '编号,可在清单页 URL 中找到', + filter: '过滤,见下表,默认为 `全部`,需要占位时可设置为 `none`', + sort: '排序,见下表,默认为 `加入时间排序`', + }, radar: [ { source: ['javdb.com/'], target: '', }, ], - name: 'Unknown', + name: '清单', maintainers: ['dddepg'], handler, url: 'javdb.com/', + description: `过滤 + +| 全部 | 占位 | 可播放 | 單體作品 | 含磁链 | 含字幕 | 預覽圖 | +| ---- | ---- | -------- | -------- | -------- | ------ | ------- | +| | none | playable | single | download | cnsub | preview | + +排序 + +| 加入时间排序 | 发布时间排序 | +| ------------ | ------------ | +| 0 | 1 |`, features: { nsfw: true, }, diff --git a/lib/routes/javlibrary/bestrated.ts b/lib/routes/javlibrary/bestrated.ts index 482f1c9bb..e8dcaf34b 100644 --- a/lib/routes/javlibrary/bestrated.ts +++ b/lib/routes/javlibrary/bestrated.ts @@ -4,8 +4,11 @@ import { defaultLanguage, defaultMode, ProcessItems, rootUrl } from './utils'; export const route: Route = { path: ['/videos/bestrated/:language?/:mode?', '/bestrated/:language?/:mode?'], - name: 'Unknown', - maintainers: [], + categories: ['multimedia'], + example: '/javlibrary/bestrated/en', + parameters: { language: 'Language, see below, Japanese by default, as `ja`', mode: 'Mode, see below, Last Month by default, as `1`' }, + name: 'Best Rated Videos', + maintainers: ['nczitzk'], handler, description: `| Last Month | All Time | | ---------- | -------- | diff --git a/lib/routes/javlibrary/genre.ts b/lib/routes/javlibrary/genre.ts index 4077bfa93..e4037f02e 100644 --- a/lib/routes/javlibrary/genre.ts +++ b/lib/routes/javlibrary/genre.ts @@ -4,8 +4,11 @@ import { defaultGenre, defaultLanguage, defaultMode, ProcessItems, rootUrl } fro export const route: Route = { path: ['/videos/genre/:genre?/:language?/:mode?', '/genre/:genre?/:language?/:mode?'], - name: 'Unknown', - maintainers: [], + categories: ['multimedia'], + example: '/javlibrary/genre/amjq/en', + parameters: { genre: 'Category, Acme · Orgasm by default, as `amjq`', language: 'Language, see below, Japanese by default, as `ja`', mode: 'Mode, see below, videos with comments (by date) by default, as `1`' }, + name: 'Videos by categories', + maintainers: ['nczitzk'], handler, description: `| videos with comments (by date) | everything (by date) | | ------------------------------ | -------------------- | diff --git a/lib/routes/javlibrary/maker.ts b/lib/routes/javlibrary/maker.ts index e11e07c7b..ee0bcb9fa 100644 --- a/lib/routes/javlibrary/maker.ts +++ b/lib/routes/javlibrary/maker.ts @@ -17,7 +17,7 @@ export const route: Route = { nsfw: true, }, name: 'Videos by makers', - maintainers: [], + maintainers: ['Huzhixin00'], handler, description: `| videos with comments (by date) | everything (by date) | | ------------------------------ | -------------------- | diff --git a/lib/routes/javlibrary/mostwanted.ts b/lib/routes/javlibrary/mostwanted.ts index 69bba16e0..dfb43c86f 100644 --- a/lib/routes/javlibrary/mostwanted.ts +++ b/lib/routes/javlibrary/mostwanted.ts @@ -4,8 +4,11 @@ import { defaultLanguage, defaultMode, ProcessItems, rootUrl } from './utils'; export const route: Route = { path: ['/videos/mostwanted/:language?/:mode?', '/mostwanted/:language?/:mode?'], - name: 'Unknown', - maintainers: [], + categories: ['multimedia'], + example: '/javlibrary/mostwanted/en', + parameters: { language: 'Language, see below, Japanese by default, as `ja`', mode: 'Mode, see below, Last Month by default, as `1`' }, + name: 'Most Wanted Videos', + maintainers: ['nczitzk'], handler, description: `| Last Month | All Time | | ---------- | -------- | diff --git a/lib/routes/javlibrary/newentries.ts b/lib/routes/javlibrary/newentries.ts index 40ec2e36c..305666fe5 100644 --- a/lib/routes/javlibrary/newentries.ts +++ b/lib/routes/javlibrary/newentries.ts @@ -4,8 +4,11 @@ import { defaultLanguage, ProcessItems, rootUrl } from './utils'; export const route: Route = { path: ['/videos/newentries/:language?', '/newentries/:language?'], - name: 'Unknown', - maintainers: [], + categories: ['multimedia'], + example: '/javlibrary/newentries/en', + parameters: { language: 'Language, see below, Japanese by default, as `ja`' }, + name: 'Recently Inserted Videos', + maintainers: ['nczitzk'], handler, features: { nsfw: true, diff --git a/lib/routes/javlibrary/newrelease.ts b/lib/routes/javlibrary/newrelease.ts index def757006..d19d39046 100644 --- a/lib/routes/javlibrary/newrelease.ts +++ b/lib/routes/javlibrary/newrelease.ts @@ -4,8 +4,11 @@ import { defaultLanguage, defaultMode, ProcessItems, rootUrl } from './utils'; export const route: Route = { path: ['/videos/newrelease/:language?/:mode?', '/newrelease/:language?/:mode?'], - name: 'Unknown', - maintainers: [], + categories: ['multimedia'], + example: '/javlibrary/newrelease/en', + parameters: { language: 'Language, see below, Japanese by default, as `ja`', mode: 'Mode, see below, videos with comments (by date) by default, as `1`' }, + name: 'New Releases', + maintainers: ['nczitzk'], handler, description: `| videos with comments (by date) | everything (by date) | | ------------------------------ | -------------------- | diff --git a/lib/routes/javlibrary/update.ts b/lib/routes/javlibrary/update.ts index 4079aea21..c5b524314 100644 --- a/lib/routes/javlibrary/update.ts +++ b/lib/routes/javlibrary/update.ts @@ -4,8 +4,11 @@ import { defaultLanguage, ProcessItems, rootUrl } from './utils'; export const route: Route = { path: ['/videos/update/:language?', '/update/:language?'], - name: 'Unknown', - maintainers: [], + categories: ['multimedia'], + example: '/javlibrary/update/en', + parameters: { language: 'Language, see below, Japanese by default, as `ja`' }, + name: 'Recently Discussed Videos', + maintainers: ['nczitzk'], handler, features: { nsfw: true, diff --git a/lib/routes/javlibrary/user.ts b/lib/routes/javlibrary/user.ts index d1d834151..dee7f534a 100644 --- a/lib/routes/javlibrary/user.ts +++ b/lib/routes/javlibrary/user.ts @@ -4,8 +4,11 @@ import { defaultLanguage, ProcessItems, rootUrl } from './utils'; export const route: Route = { path: ['/users/:id/:type/:language?', '/:type/:id/:language?'], - name: 'Unknown', - maintainers: [], + categories: ['multimedia'], + example: '/javlibrary/userwatched/mangudai/en', + parameters: { type: 'Type, see below', id: 'User id, can be found in URL', language: 'Language, see below, Japanese by default, as `ja`' }, + name: 'Videos by user', + maintainers: ['nczitzk', 'DIYgod', 'junfengP'], handler, description: `| Wanted | Watched | Owned | | ---------- | ----------- | --------- | diff --git a/lib/routes/jiaoliudao/index.ts b/lib/routes/jiaoliudao/index.ts index 7aa0e6423..91d3cd2a1 100644 --- a/lib/routes/jiaoliudao/index.ts +++ b/lib/routes/jiaoliudao/index.ts @@ -4,13 +4,15 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/', + categories: ['blog'], + example: '/jiaoliudao', radar: [ { source: ['jiaoliudao.com/'], target: '', }, ], - name: 'Unknown', + name: '最新文章', maintainers: ['TonyRL'], handler, url: 'jiaoliudao.com/', diff --git a/lib/routes/jseea/namespace.ts b/lib/routes/jseea/namespace.ts index 93129b017..560e6a41e 100644 --- a/lib/routes/jseea/namespace.ts +++ b/lib/routes/jseea/namespace.ts @@ -1,7 +1,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: 'Unknown', + name: '江苏省教育考试院', url: 'jseea.cn', lang: 'zh-CN', }; diff --git a/lib/routes/jseea/news.ts b/lib/routes/jseea/news.ts index aba745372..57b20e07b 100644 --- a/lib/routes/jseea/news.ts +++ b/lib/routes/jseea/news.ts @@ -26,15 +26,21 @@ async function loadContent(link) { export const route: Route = { path: '/news/:type?', + categories: ['government'], + example: '/jseea/news/zkyw', + parameters: { type: '分类,默认为 `zkyw`,具体参数见下表' }, radar: [ { source: ['jseea.cn/webfile/news/:type'], target: '/news/:type', }, ], - name: 'Unknown', + name: '新闻中心', maintainers: ['schen1024'], handler, + description: `| 招考要闻 | 教育动态 | 招考信息 | 政策文件 | 院校动态 | +| :------: | :------: | :------: | :------: | :------: | +| zkyw | jydt | zkxx | zcwj | yxdt |`, }; async function handler(ctx) { diff --git a/lib/routes/jsu/cxzx.ts b/lib/routes/jsu/cxzx.ts index 9b65d748d..78ac3ea13 100644 --- a/lib/routes/jsu/cxzx.ts +++ b/lib/routes/jsu/cxzx.ts @@ -10,9 +10,23 @@ import { getPageItemAndDate } from './utils/index'; export const route: Route = { path: '/cxzx/:types?', - name: 'Unknown', + categories: ['university'], + example: '/jsu/cxzx/xkjs', + parameters: { types: '通知分类 默认为`xkjs`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '创新中心', maintainers: ['wenjia03'], handler, + description: `| 通知公告 | 学科竞赛公告 | 创新项目公告 | 竞赛新闻 | 竞赛通知 | +| -------- | ------------ | ------------ | -------- | -------- | +| tzgg | xkjs | cxtz | jsxw | jstz |`, }; async function handler(ctx) { diff --git a/lib/routes/kantarworldpanel/index.tsx b/lib/routes/kantarworldpanel/index.tsx index 76158837c..4634109d4 100644 --- a/lib/routes/kantarworldpanel/index.tsx +++ b/lib/routes/kantarworldpanel/index.tsx @@ -9,9 +9,82 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/:region?/:category{.+}?', - name: 'Unknown', - maintainers: [], + categories: ['new-media'], + example: '/kantarworldpanel/cn-en/news', + parameters: { region: 'Region id, see below, Chinese Mainland English by default', category: 'Category, can be found in URL, News by default' }, + name: 'News Centre', + maintainers: ['nczitzk'], handler, + description: `| Region | id | +| ----------- | ----- | +| China Eng | cn-en | +| China 中文 | cn | +| Indonesia | id | +| Korea | kr | +| Malaysia | my | +| Philippines | ph | +| Taiwan | tw | +| Thailand | th | +| Vietnam | vn | + +
+ More categories + +#### China Eng + +| News | Retail Snapshot | Publications | In the media | +| ---- | --------------- | -------------------- | ------------ | +| news | publications | publications/Reports | In-the-media | + +#### China 中文 + +| 新闻发布 | 零售市场快报 | 市场报告 | 媒体报道 | +| -------- | ------------ | --------------------------- | -------------- | +| news | publications | publications/China-Insights | press-releases | + +#### Indonesia + +| News | Kantar Scoop | Video Series | Podcast | Ready, Steady, Shop! | Asia Pulse | +| ---- | ----------------------------- | ----------------- | ------------ | ------------------------ | --------------- | +| News | News/Kantar-Worldpanel-Series | News/video-series | News/podcast | News/asia-shopper-series | News/Asia-Pulse | + +#### Korea + +| News | Insight Reports | In the Media | +| ---- | --------------- | -------------- | +| news | publications | press-releases | + +#### Malaysia + +| News | +| ---- | +| news | + +#### Philippines + +| Latest Insights | In the Media | Events | +| --------------- | ------------ | ------ | +| Latest-Insights | In-the-Media | events | + +#### Taiwan + +| 聚焦台灣 | WOW SPOT | 市場報告 | 媒體報導 | 活動 | +| ------------------------ | ------------ | ------------ | -------------- | ------ | +| news/spotlight-on-taiwan | news/wowspot | publications | press-releases | events | + +#### Thailand + +| News | +| ---- | +| news | + +#### Vietnam + +| Insights | FMCG Monitor | Ready, Steady, Shop! | Asia Pulse | IN THE MEDIA | +| -------- | ----------------- | ---------------------- | --------------- | ------------ | +| news | news/FMCG-Monitor | news/ready-steady-shop | news/asia-pulse | In-the-media | + +
`, }; async function handler(ctx) { diff --git a/lib/routes/keepass/news.ts b/lib/routes/keepass/news.ts index 834e38f6d..ef6ca4b44 100644 --- a/lib/routes/keepass/news.ts +++ b/lib/routes/keepass/news.ts @@ -7,7 +7,9 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/', - name: 'Unknown', + categories: ['program-update'], + example: '/keepass', + name: 'News', maintainers: ['TonyRL'], handler, }; diff --git a/lib/routes/layoffs/index.ts b/lib/routes/layoffs/index.ts index f99efff0b..36c3c296f 100644 --- a/lib/routes/layoffs/index.ts +++ b/lib/routes/layoffs/index.ts @@ -43,6 +43,8 @@ const getMappings = function (obj) { export const route: Route = { path: '/', + categories: ['other'], + example: '/layoffs', radar: [ { source: ['layoffs.fyi/'], diff --git a/lib/routes/leetcode/dailyquestion-cn.ts b/lib/routes/leetcode/dailyquestion-cn.ts index d7c27389a..7075c9281 100644 --- a/lib/routes/leetcode/dailyquestion-cn.ts +++ b/lib/routes/leetcode/dailyquestion-cn.ts @@ -7,13 +7,15 @@ const host = 'https://leetcode.cn'; export const route: Route = { path: '/dailyquestion/cn', + categories: ['programming'], + example: '/leetcode/dailyquestion/cn', radar: [ { source: ['leetcode.cn/'], }, ], - name: 'Unknown', - maintainers: [], + name: '每日一题', + maintainers: ['IvanWng97'], handler, url: 'leetcode.cn/', }; diff --git a/lib/routes/leetcode/dailyquestion-en.ts b/lib/routes/leetcode/dailyquestion-en.ts index 9d6df03ae..7f004f1a5 100644 --- a/lib/routes/leetcode/dailyquestion-en.ts +++ b/lib/routes/leetcode/dailyquestion-en.ts @@ -7,13 +7,15 @@ const host = 'https://leetcode.com'; export const route: Route = { path: '/dailyquestion/en', + categories: ['programming'], + example: '/leetcode/dailyquestion/en', radar: [ { source: ['leetcode.com/'], }, ], - name: 'Unknown', - maintainers: [], + name: 'Daily Question', + maintainers: ['IvanWng97'], handler, url: 'leetcode.com/', }; diff --git a/lib/routes/leetcode/dailyquestion-solution-cn.ts b/lib/routes/leetcode/dailyquestion-solution-cn.ts index bde5bd107..28500ed2e 100644 --- a/lib/routes/leetcode/dailyquestion-solution-cn.ts +++ b/lib/routes/leetcode/dailyquestion-solution-cn.ts @@ -12,13 +12,15 @@ const md = MarkdownIt({ export const route: Route = { path: '/dailyquestion/solution/cn', + categories: ['programming'], + example: '/leetcode/dailyquestion/solution/cn', radar: [ { source: ['leetcode.cn/'], }, ], - name: 'Unknown', - maintainers: [], + name: '每日一题题解', + maintainers: ['woaidouya123'], handler, url: 'leetcode.cn/', }; diff --git a/lib/routes/leetcode/dailyquestion-solution-en.ts b/lib/routes/leetcode/dailyquestion-solution-en.ts index 8da7680a4..279da4836 100644 --- a/lib/routes/leetcode/dailyquestion-solution-en.ts +++ b/lib/routes/leetcode/dailyquestion-solution-en.ts @@ -13,13 +13,15 @@ const md = MarkdownIt({ }); export const route: Route = { path: '/dailyquestion/solution/en', + categories: ['programming'], + example: '/leetcode/dailyquestion/solution/en', radar: [ { source: ['leetcode.com/'], }, ], - name: 'Unknown', - maintainers: [], + name: 'Daily Question Solution', + maintainers: ['woaidouya123'], handler, url: 'leetcode.com/', }; diff --git a/lib/routes/leiphone/category.ts b/lib/routes/leiphone/category.ts new file mode 100644 index 000000000..8481126f9 --- /dev/null +++ b/lib/routes/leiphone/category.ts @@ -0,0 +1,100 @@ +import { load } from 'cheerio'; + +import type { Route } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; + +import utils from './utils'; + +export const route: Route = { + path: '/category/:catname', + categories: ['new-media'], + example: '/leiphone/category/industrynews', + parameters: { catname: '网站顶部分类栏目' }, + description: `- 主栏目 + +| 业界 | 人工智能 | 智能驾驶 | 数智化 | 金融科技 | 医疗科技 | 芯片 | 政企安全 | 智慧城市 | 行业云 | 工业互联网 | AIoT | +| ------------ | -------- | -------------- | --------------- | -------- | -------- | ----- | ---------- | --------- | ------------- | ------------------ | ---- | +| industrynews | ai | transportation | digitalindustry | fintech | aihealth | chips | gbsecurity | smartcity | industrycloud | IndustrialInternet | iot | + +- 子栏目 + +- 人工智能 + +| 学术 | 开发者 | +| -------- | -------- | +| academic | yanxishe | + +- 数智化 + +| 零售数智化 | 金融数智化 | 工业数智化 | 医疗数智化 | 城市数智化 | +| ---------- | ---------- | ---------- | ---------- | ----------- | +| redigital | findigital | mandigital | medigital | citydigital | + +- 金融科技 + +| 科技巨头 | 银行 AI | 金融云 | 风控与安全 | +| -------- | ------- | ------------ | ------------ | +| BigTech | bank | FinanceCloud | DataSecurity | + +- 医疗科技 + +| 医疗 AI | 投融资 | 医疗器械 | 互联网医疗 | 生物医药 | 健康险 | +| -------- | ------ | -------- | ---------------- | ------------ | ------------ | +| healthai | touzi | qixie | hulianwangyiliao | shengwuyiyao | jiankangxian | + +- 芯片 + +| 材料设备 | 芯片设计 | 晶圆代工 | 封装测试 | +| --------- | ---------- | ------------- | --------- | +| materials | chipdesign | manufacturing | packaging | + +- 智慧城市 + +| 智慧安防 | 智慧教育 | 智慧交通 | 智慧社区 | 智慧零售 | 智慧政务 | 智慧地产 | +| ------------- | -------------- | ------------------- | -------------- | -------------- | --------------- | -------- | +| smartsecurity | smarteducation | smarttransportation | smartcommunity | smartretailing | smartgovernment | proptech | + +- 工业互联网 + +| 工业软件 | 工业安全 | 5G 工业互联网 | 工业转型实践 | +| ---------- | -------- | ------------- | ------------ | +| gysoftware | gysafety | 5ggy | gypratice | + +- AIoT + +| 物联网 | 智能硬件 | 机器人 | 智能家居 | +| ------ | -------- | ------ | --------- | +| 5G | arvr | robot | smarthome |`, + radar: [ + { + source: ['leiphone.com/category/:catname'], + target: '/category/:catname', + }, + ], + name: '栏目', + maintainers: ['vlcheng'], + handler, + url: 'leiphone.com/', +}; + +export async function handler(ctx) { + const catname = ctx.req.param('catname'); + const rootUrl = 'https://www.leiphone.com'; + const url = catname ? `${rootUrl}/category/${catname}` : rootUrl; + const res = await got.get(url); + const $ = load(res.data); + + const list = $('.word > h3 > a') + .slice(0, 10) + .toArray() + .map((e) => $(e).attr('href')); + const items = await utils.ProcessFeed(list, cache); + + return { + title: `雷峰网${catname ? ` ${catname}` : ''}`, + description: '雷峰网 - 读懂智能&未来', + link: url, + item: items, + }; +} diff --git a/lib/routes/leiphone/index.ts b/lib/routes/leiphone/index.ts index 07c0262f2..6b1e2ed74 100644 --- a/lib/routes/leiphone/index.ts +++ b/lib/routes/leiphone/index.ts @@ -1,43 +1,19 @@ -import { load } from 'cheerio'; - import type { Route } from '@/types'; -import cache from '@/utils/cache'; -import got from '@/utils/got'; -import utils from './utils'; +import { handler } from './category'; export const route: Route = { - path: '/:do?/:keyword?', + path: '/', + categories: ['new-media'], + example: '/leiphone', radar: [ { source: ['leiphone.com/'], target: '', }, ], - name: 'Unknown', - maintainers: [], + name: '最新文章', + maintainers: ['vlcheng'], handler, url: 'leiphone.com/', }; - -async function handler(ctx) { - const todo = ctx.req.param('do') ?? ''; - const keyword = ctx.req.param('keyword') ?? ''; - const rootUrl = 'https://www.leiphone.com'; - const url = `${rootUrl}/${todo}/${keyword}`; - const res = await got.get(url); - const $ = load(res.data); - - const list = $('.word > h3 > a') - .slice(0, 10) - .toArray() - .map((e) => $(e).attr('href')); - const items = await utils.ProcessFeed(list, cache); - - return { - title: `雷峰网${todo === 'category' ? ` ${keyword}` : ''}`, - description: '雷峰网 - 读懂智能&未来', - link: url, - item: items, - }; -} diff --git a/lib/routes/leiphone/newsflash.ts b/lib/routes/leiphone/newsflash.ts index 0b8467e39..16967e56e 100644 --- a/lib/routes/leiphone/newsflash.ts +++ b/lib/routes/leiphone/newsflash.ts @@ -21,10 +21,11 @@ export const route: Route = { radar: [ { source: ['leiphone.com/'], + target: '/newsflash', }, ], name: '业界资讯', - maintainers: [], + maintainers: ['vlcheng'], handler, url: 'leiphone.com/', }; diff --git a/lib/routes/lfsyd/tag.ts b/lib/routes/lfsyd/tag.ts index 05ba52a51..1ced3fe46 100644 --- a/lib/routes/lfsyd/tag.ts +++ b/lib/routes/lfsyd/tag.ts @@ -7,15 +7,26 @@ import { ProcessFeed, ProcessForm } from './utils'; export const route: Route = { path: '/tag/:tagId?', + categories: ['game'], + example: '/lfsyd/tag/17', + parameters: { tagId: '订阅分区类型' }, + description: `| 炉石传说 | 万智牌 | 游戏王 | 昆特牌 | 影之诗 | 符文之地传奇 | 阴阳师百闻牌 | +| :------: | :----: | :----: | :----: | :----: | :----------: | :----------: | +| 17 | 18 | 16 | 19 | 20 | 329 | 221 | + +| 英雄联盟 | 电子游戏 | 桌面游戏 | 卡牌游戏 | 玩家杂谈 | 二次元 | +| :------: | :------: | :------: | :------: | :------: | :----: | +| 112 | 389 | 24 | 102 | 23 | 117 |`, radar: [ { source: ['mob.iyingdi.com/fine/:tagId'], target: '/tag/:tagId', }, ], - name: 'Unknown', + name: '分区', maintainers: ['auto-bot-ty'], handler, + url: 'www.iyingdi.com/', }; async function handler(ctx) { diff --git a/lib/routes/lfsyd/user.ts b/lib/routes/lfsyd/user.ts index 16a335a0e..99f29d3b2 100644 --- a/lib/routes/lfsyd/user.ts +++ b/lib/routes/lfsyd/user.ts @@ -7,15 +7,22 @@ import { ProcessFeed, ProcessForm } from './utils'; export const route: Route = { path: '/user/:id?', + categories: ['game'], + example: '/lfsyd/user/55547', + parameters: { id: '用户 id' }, + description: `可以在用户主页的 URL 中找到 + +Example:\`https://www.iyingdi.com/tz/people/55547\` ,id 是 \`55547\``, radar: [ { source: ['www.iyingdi.com/tz/people/:id', 'www.iyingdi.com/tz/people/:id/*'], target: '/user/:id', }, ], - name: 'Unknown', + name: '用户的帖子', maintainers: ['auto-bot-ty'], handler, + url: 'www.iyingdi.com/', }; async function handler(ctx) { diff --git a/lib/routes/lifeweek/channel.ts b/lib/routes/lifeweek/channel.ts index fec9ddf07..459ebc0d8 100644 --- a/lib/routes/lifeweek/channel.ts +++ b/lib/routes/lifeweek/channel.ts @@ -10,14 +10,22 @@ const articleRootUrl = 'https://www.lifeweek.com.cn/article'; export const route: Route = { path: '/channel/:id', + categories: ['traditional-media'], + example: '/lifeweek/channel/9', + parameters: { id: '栏目 ID' }, + description: `提取文章全文,获得更好的阅读体验。支持所有频道,频道名称见 [杂志栏目](https://www.lifeweek.com.cn/classify?type=2)。例如 [调查栏目](https://www.lifeweek.com.cn/column/9) URL 最后的数字为栏目 ID + +| 调查 | 热点 | 人物 | 社会 | 经济 | 文化 | +| ---- | ---- | ---- | ---- | ---- | ---- | +| 9 | 6 | 10 | 2 | 3 | 4 |`, radar: [ { source: ['lifeweek.com.cn/column/:channel'], target: '/channel/:channel', }, ], - name: 'Unknown', - maintainers: [], + name: '栏目', + maintainers: ['changren-wcr'], handler, }; diff --git a/lib/routes/lifeweek/tag.ts b/lib/routes/lifeweek/tag.ts index fc18896c2..886a0025d 100644 --- a/lib/routes/lifeweek/tag.ts +++ b/lib/routes/lifeweek/tag.ts @@ -10,14 +10,22 @@ const articleRootUrl = 'https://www.lifeweek.com.cn/article'; export const route: Route = { path: '/tag/:id', + categories: ['traditional-media'], + example: '/lifeweek/tag/122', + parameters: { id: '标签 ID' }, + description: `提取文章全文,获得更好的阅读体验。支持所有标签,标签名称见 [全部标签](https://www.lifeweek.com.cn/classify?type=1)。例如 [社会调查标签](https://www.lifeweek.com.cn/articleList/122) URL 最后的数字为标签 ID + +| 社会调查 | 社会 | 经济 | 理财 | 热点 | +| -------- | ---- | ---- | ---- | ---- | +| 122 | 21 | 73 | 74 | 123 |`, radar: [ { source: ['lifeweek.com.cn/articleList/:tag'], target: '/tag/:tag', }, ], - name: 'Unknown', - maintainers: [], + name: '标签', + maintainers: ['changren-wcr'], handler, }; diff --git a/lib/routes/lightnovel/light-novel.ts b/lib/routes/lightnovel/light-novel.ts index ea154ee98..9c23fece2 100644 --- a/lib/routes/lightnovel/light-novel.ts +++ b/lib/routes/lightnovel/light-novel.ts @@ -8,13 +8,19 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/:keywords/:security_key?', + categories: ['anime'], + example: '/lightnovel/歡迎來到實力至上主義的教室/3cfc2dc63f3575ee42e12823188ad1b5:1709125:0', + parameters: { + keywords: '关键字,可以模糊匹配,但最好精确匹配', + security_key: 'cookie,由于文章有防爬,所以必须携带cookie请求。route中的cookie优先级高于环境变量cookie,取token中的security_key值', + }, radar: [ { source: ['lightNovel.us/'], target: '/:keywords/:security_key', }, ], - name: 'Unknown', + name: '文章更新阅读', maintainers: ['nightmare-mio'], handler, url: 'lightNovel.us/', diff --git a/lib/routes/literotica/category.ts b/lib/routes/literotica/category.ts index dc4ade89e..6ced9ddee 100644 --- a/lib/routes/literotica/category.ts +++ b/lib/routes/literotica/category.ts @@ -7,12 +7,17 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/category/:category', + categories: ['reading'], + example: '/literotica/category/anal-sex-stories', + parameters: { + category: 'Category, can be found in URL', + }, radar: [ { source: ['literotica.com/c/:category', 'literotica.com/'], }, ], - name: 'Unknown', + name: 'Category', maintainers: ['nczitzk'], handler, features: { diff --git a/lib/routes/liulinblog/index.ts b/lib/routes/liulinblog/index.ts index 440e6f2da..3b80463cc 100644 --- a/lib/routes/liulinblog/index.ts +++ b/lib/routes/liulinblog/index.ts @@ -2,22 +2,55 @@ import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; +import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { - path: '/:params{.+}?', - name: 'Unknown', - maintainers: [], + path: '/:channel?', + categories: ['new-media'], + example: '/liulinblog', + parameters: { channel: '频道 id,可在对应频道页 URL 中找到,见下表,默认为最新' }, + radar: [ + { + source: ['liulinblog.com/:channel', 'liulinblog.com/'], + target: '/:channel', + }, + ], + name: '频道', + maintainers: ['nczitzk'], handler, + description: `| 最新 | 60 秒读懂世界 | 精品资源 | 视频资源 | 音频资源 | +| ---- | ------------- | -------- | -------- | -------- | +| | kuaixun | ziyuan | video | yinpin | + +| 绝版资源 | 实用文档 | PPT 素材 | 后期素材 | 技能教程 | +| -------- | -------- | --------- | -------- | --------- | +| jueban | wendang | ppt-sucai | sucai | jiaocheng | + +| 创业副业 | 单机游戏 | 冒险解谜 | 竞技格斗 | 赛车竞技 | +| -------- | -------- | -------- | ----------- | -------- | +| money | game | mxjm | jingjigedou | saiche | + +| 模拟经营 | 角色扮演 | 飞行游戏 | 塔防策略 | 射击游戏 | +| -------- | -------- | -------- | -------- | -------- | +| moni | jiaose | feixing | tafang | sheji | + +| 恐怖冒险 | 策略生存 | 动作冒险 | 电商运营 | 互联网早报 | +| -------- | -------- | -------- | --------- | ---------- | +| kongbu | celve | dongzuo | dianshang | internet | + +| 站长圈 | 自媒体运营 | 短视频 | +| ------ | ---------- | ----------- | +| seo | zimeiti | duan-shipin |`, }; -async function handler(ctx) { - const params = ctx.req.param('params'); +export async function handler(ctx) { + const subPath = getSubPath(ctx); const limit = ctx.req.query('limit') ? Number(ctx.req.query('limit')) : 20; const rootUrl = 'https://www.liulinblog.com'; - const currentUrl = params ? new URL(params, rootUrl).href : rootUrl; + const currentUrl = subPath === '/' ? rootUrl : new URL(subPath, rootUrl).href; const { data: response } = await got(currentUrl); @@ -94,7 +127,7 @@ async function handler(ctx) { return { item: items, - title: `${title} - ${params ? $('h1.term-title').text().split('搜索到', 1)[0] : '最新'}`, + title: `${title} - ${subPath === '/' ? '最新' : $('h1.term-title').text().split('搜索到', 1)[0]}`, link: currentUrl, description: $('meta[name="description"]').prop('content'), language: 'zh-cn', diff --git a/lib/routes/liulinblog/itnews.ts b/lib/routes/liulinblog/itnews.ts index 649e4adde..8f9953e0d 100644 --- a/lib/routes/liulinblog/itnews.ts +++ b/lib/routes/liulinblog/itnews.ts @@ -2,9 +2,15 @@ import type { Route } from '@/types'; export const route: Route = { path: '/itnews/:channel', - name: 'Unknown', - maintainers: [], + categories: ['new-media'], + example: '/liulinblog/itnews/seo', + parameters: { channel: '频道,见下表' }, + name: '网络营销', + maintainers: ['Fatpandac', 'nczitzk'], handler, + description: `| 网络营销 | 电商运营 | 互联网早报 | 站长圈 | +| -------- | --------- | ---------- | ------ | +| | dianshang | internet | seo |`, }; function handler(ctx) { diff --git a/lib/routes/liulinblog/kuaixun.ts b/lib/routes/liulinblog/kuaixun.ts new file mode 100644 index 000000000..aaa8e1465 --- /dev/null +++ b/lib/routes/liulinblog/kuaixun.ts @@ -0,0 +1,18 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/kuaixun', + categories: ['new-media'], + example: '/liulinblog/kuaixun', + radar: [ + { + source: ['liulinblog.com/kuaixun', 'liulinblog.com/'], + target: '/kuaixun', + }, + ], + name: '60 秒读懂世界', + maintainers: ['Fatpandac', 'nczitzk'], + handler, +}; diff --git a/lib/routes/liulinblog/search.ts b/lib/routes/liulinblog/search.ts new file mode 100644 index 000000000..c3dc7333b --- /dev/null +++ b/lib/routes/liulinblog/search.ts @@ -0,0 +1,19 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/search/:keyword', + categories: ['new-media'], + example: '/liulinblog/search/单机游戏', + parameters: { keyword: '关键字' }, + radar: [ + { + source: ['liulinblog.com/search/:keyword', 'liulinblog.com/'], + target: '/search/:keyword', + }, + ], + name: '搜索', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/liulinblog/series.ts b/lib/routes/liulinblog/series.ts new file mode 100644 index 000000000..04bb582e4 --- /dev/null +++ b/lib/routes/liulinblog/series.ts @@ -0,0 +1,22 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/series/:id', + categories: ['new-media'], + example: '/liulinblog/series/xunlei', + parameters: { id: '专题 id,可在对应标签页 URL 中找到,见下表' }, + radar: [ + { + source: ['liulinblog.com/series/:id', 'liulinblog.com/'], + target: '/series/:id', + }, + ], + name: '专题', + maintainers: ['nczitzk'], + handler, + description: `| 【免费速存】迅雷资源合集 | 直播带货教程 | 电商培训课程 | 拼多多运营培训 | 小红书运营 | 抖音运营 | 闲鱼运营 | 短视频运营 | +| ------------------------ | ------------ | --------------- | -------------- | ----------- | ------------- | ------------- | ----------------- | +| xunlei | zhibodaihuo | dianshangpeixun | pinduoduo | xiaohongshu | douyinyunying | xianyuyunying | duanshipinyunying |`, +}; diff --git a/lib/routes/liulinblog/tag.ts b/lib/routes/liulinblog/tag.ts new file mode 100644 index 000000000..105f06b7e --- /dev/null +++ b/lib/routes/liulinblog/tag.ts @@ -0,0 +1,42 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/tag/:id', + categories: ['new-media'], + example: '/liulinblog/tag/qukuailian', + parameters: { id: '标签 id,可在对应标签页 URL 中找到,见下表' }, + radar: [ + { + source: ['liulinblog.com/tag/:id', 'liulinblog.com/'], + target: '/tag/:id', + }, + ], + name: '标签', + maintainers: ['nczitzk'], + handler, + description: `| 区块链 | 小红书 | 小说项目 | 微信公众号 | 微信营销 | +| ---------- | ----------- | -------- | ---------- | -------- | +| qukuailian | xiaohongshu | xiaoshuo | 微信公众号 | we-chat | + +| 抖音 | 抖音直播 | 拼多多 | 支付宝 | 教育 | +| ---- | -------- | --------- | ------ | ---- | +| 抖音 | 抖音直播 | pinduoduo | alipay | 教育 | + +| chrome 插件 | galgame 汉化游戏 | honeyselect 汉化游戏 | PSD 笔刷素材 | ps 插件 | +| ----------- | ---------------- | -------------------- | ------------ | ---------- | +| chrome 插件 | galgame | honey-select | psd-bishua | ps-chajian | + +| vip 视频 | windows 实用技巧 | 下载软件 | 丝袜玉足 | 免费字体下载 | +| ---------- | ---------------- | -------- | -------- | ------------ | +| vip-shipin | computer | download | siwa | ziti | + +| 二战游戏下载 | 冒险解谜游戏 | 动作游戏下载 | 安卓游戏 | 策略游戏 | +| ------------ | ------------ | ------------ | ------------ | ---------- | +| war-games | 冒险解谜游戏 | 动作游戏下载 | android-game | game-celve | + +| Pr 插件 | Python | seo 优化 | VLOG | wordpress | word 技巧 | +| ------- | ------ | -------- | ---- | --------- | --------- | +| pr 插件 | python | seo | vlog | wordpress | word |`, +}; diff --git a/lib/routes/lkong/forum.ts b/lib/routes/lkong/forum.ts index e41245903..58c63f156 100644 --- a/lib/routes/lkong/forum.ts +++ b/lib/routes/lkong/forum.ts @@ -8,12 +8,18 @@ import { renderContent } from './templates/content'; export const route: Route = { path: '/forum/:id?/:digest?', + categories: ['bbs'], + example: '/lkong/forum/60', + parameters: { + id: '分区 id, 可在分区的URL里找到', + digest: '默认获取全部主题,任意值则只获取精华主题', + }, radar: [ { source: ['lkong.com/forum/:id', 'lkong.com/'], }, ], - name: 'Unknown', + name: '分区', maintainers: ['nczitzk', 'ma6254'], handler, }; diff --git a/lib/routes/lkong/thread.tsx b/lib/routes/lkong/thread.tsx index f85d6e255..127ee186f 100644 --- a/lib/routes/lkong/thread.tsx +++ b/lib/routes/lkong/thread.tsx @@ -10,12 +10,17 @@ import { renderContent } from './templates/content'; export const route: Route = { path: '/thread/:id', + categories: ['bbs'], + example: '/lkong/thread/3100275', + parameters: { + id: '帖子 id, 可在帖子的URL里找到', + }, radar: [ { source: ['lkong.com/thread/:id', 'lkong.com/'], }, ], - name: 'Unknown', + name: '帖子', maintainers: ['nczitzk', 'ma6254'], handler, }; diff --git a/lib/routes/logclub/columnist.ts b/lib/routes/logclub/columnist.ts new file mode 100644 index 000000000..8fa009b18 --- /dev/null +++ b/lib/routes/logclub/columnist.ts @@ -0,0 +1,106 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/columnist/articleList/:id?', + categories: ['new-media'], + example: '/logclub/columnist/articleList/27', + parameters: { id: '专家 id,见下表,可在对应企业页 URL 中找到' }, + radar: [ + { + source: ['logclub.com/columnist/articleList/:id'], + target: '/columnist/articleList/:id', + }, + ], + name: '专家说', + maintainers: ['nczitzk'], + handler, + description: `#### 精选专家 + +| 潘永刚 | Tracy | 唐隆基 | 褚建新 | +| ------ | ----- | ------ | ------ | +| 27 | 157 | 91 | 9749 | + +前往 [更多](https://www.logclub.com/columnist/authorMore/experts) 查看更多专家 + +#### 资深作者 + +| 物流麻将胡 | 小周伯通 | 郭嘉 | 周艳青 | +| ---------- | -------- | ---- | ------ | +| 10 | 19 | 7 | 559 | + +前往 [更多](https://www.logclub.com/columnist/authorMore/author) 查看更多专家 + +#### 综合物流 + +| 韩雪峰 | 李赛赛 | 陈晓曦 | 李长宏 | +| ------ | ------ | ------ | ------ | +| 41 | 12378 | 1495 | 110 | + +前往 [更多](https://www.logclub.com/columnist/authorMore/integrated_logistics) 查看更多专家 + +#### 数字化 + +| 秦愉 | 冯雷 | 卢立新 | 段琰 | +| ---- | ---- | ------ | ---- | +| 160 | 147 | 95 | 284 | + +前往 [更多](https://www.logclub.com/columnist/authorMore/digitization) 查看更多专家 + +#### 智能化 + +| 曾志宏 | 亦橙 | 马荣 | 陈晓春 | +| ------ | ---- | ---- | ------ | +| 34 | 201 | 130 | 123 | + +前往 [更多](https://www.logclub.com/columnist/authorMore/intellectualization) 查看更多专家 + +#### 快运 + +| 王坚 | 王拥军 | 靖晟 | 廖文明 | +| ---- | ------ | ---- | ------ | +| 172 | 252 | 84 | 50 | + +前往 [更多](https://www.logclub.com/columnist/authorMore/express_transportation) 查看更多专家 + +#### 合同物流 + +| 非红 | 王鹏飞 | 周海 | 王伟 | +| ---- | ------ | ---- | ---- | +| 40 | 2274 | 168 | 158 | + +前往 [更多](https://www.logclub.com/columnist/authorMore/contract_logistics) 查看更多专家 + +#### 供应链 + +| 黄尧笛 | 卓弘毅 | 胡珉 | 雷文军 Jason | +| ------ | ------ | ---- | ------------ | +| 26 | 35 | 188 | 303 | + +前往 [更多](https://www.logclub.com/columnist/authorMore/supply_chain) 查看更多专家 + +#### 快递 + +| 致快递 | 中通之声 | 科技中通 | 明兴 | +| ------ | -------- | -------- | ---- | +| 9633 | 618 | 385 | 265 | + +前往 [更多](https://www.logclub.com/columnist/authorMore/express) 查看更多专家 + +#### 城配 + +| 张春鑫 (荡漾哥) | 梁佳 | 赵波 | 王行广 | +| --------------- | ---- | ---- | ------ | +| 1527 | 3374 | 49 | 75 | + +前往 [更多](https://www.logclub.com/columnist/authorMore/urban_distribution) 查看更多专家 + +#### 仓储 + +| 叶剑 | 木棉 | 陈艺 | 冯银川 | +| ---- | ---- | ---- | ------ | +| 1881 | 59 | 1637 | 215 | + +前往 [更多](https://www.logclub.com/columnist/authorMore/storage) 查看更多专家`, +}; diff --git a/lib/routes/logclub/company.ts b/lib/routes/logclub/company.ts new file mode 100644 index 000000000..4a618f98e --- /dev/null +++ b/lib/routes/logclub/company.ts @@ -0,0 +1,145 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/company/:id', + categories: ['new-media'], + example: '/logclub/company/14', + parameters: { id: '企业 id,见下表,可在对应企业页 URL 中找到' }, + features: { + antiCrawler: true, + }, + radar: [ + { + source: ['logclub.com/company/:id'], + target: '/company/:id', + }, + ], + name: '大企业', + maintainers: ['nczitzk'], + handler, + description: `#### 明星企业 + +| 顺丰 | 菜鸟 | 京东物流 | 德邦快递 / 德邦股份 | +| ---- | ---- | -------- | ------------------- | +| 14 | 56 | 453 | 145 | + +| 百世集团 | 中国物流集团 | 极兔速递 | 中通快递 | +| -------- | ------------ | -------- | -------- | +| 116 | 6807 | 3246 | 132 | + +前往 [更多](https://www.logclub.com/columnist/more/star) 查看更多企业 + +#### 综合物流 / 供应链企业 + +| 锐特信息 | 中国物流与采购网 | 则一 | 普路通 | +| -------- | ---------------- | ---- | ------ | +| 716 | 525 | 524 | 464 | + +| 安得智联 | 集保中国 | 上汽安吉物流 | 苏宁物流 | +| -------- | -------- | ------------ | -------- | +| 215 | 147 | 15 | 12 | + +| 准时达 | 深国际 | 益邦控股 | 卓志跨境供应链 | +| ------ | ------ | -------- | -------------- | +| 158 | 167 | 758 | 130 | + +| 日日顺 | 传化智联 | CJ 荣庆物流 | 江苏飞力达 | +| ------ | -------- | ----------- | ---------- | +| 179 | 166 | 770 | 548 | + +前往 [更多](https://www.logclub.com/columnist/more/integrated_logistics) 查看更多企业 + +#### 快递 / 快运企业 + +| 盛丰物流 | 跨越速运 | 顺心捷达 | 中国邮政 | +| -------- | -------- | -------- | -------- | +| 819 | 372 | 327 | 134 | + +| 韵达 | 申通快递 | 圆通 | 壹米滴答集团 | +| ---- | -------- | ---- | ------------ | +| 113 | 137 | 143 | 97 | + +| 安能物流 | 联邦快递 FedEx | UPS | DHL | +| -------- | -------------- | --- | --- | +| 151 | 104 | 388 | 219 | + +| 优速快递 | 中铁快运 | 德坤物流 | 商桥物流 | +| -------- | -------- | -------- | -------- | +| 1243 | 1015 | 2254 | 99 | + +前往 [更多](https://www.logclub.com/columnist/more/express) 查看更多企业 + +#### 系统 / 智能平台 / 智能硬件 / 设施企业 + +| 甲子光年 | 炬星科技 | 斑马智行 | 智行者 | +| -------- | -------- | -------- | ------ | +| 700 | 665 | 540 | 510 | + +| 纵行科技 | 行深智能 | 地上铁 | 图森未来 | +| -------- | -------- | ------ | -------- | +| 509 | 508 | 500 | 445 | + +| oTMS 运输管理云平台 | 聚龄供应链 | 博科资讯 | 富勒 FLUX | +| ------------------- | ---------- | -------- | --------- | +| 53 | 5806 | 6870 | 122 | + +| 科箭软件 | 通天晓软件 | 嬴彻科技 | 货车宝 | +| -------- | ---------- | -------- | ------ | +| 180 | 503 | 462 | 129 | + +前往 [更多](https://www.logclub.com/columnist/more/intellectualization) 查看更多企业 + +#### 货运 / 配送平台 / 仓储 / 地产企业 + +| 卡力互联 | 想乐送 | 宝湾物流 | 卡车之家 | +| -------- | ------ | -------- | -------- | +| 1660 | 1558 | 1031 | 365 | + +| 罗宾升 | 好多车 | 饿了么 | 闪送 | +| ------ | ------ | ------ | ---- | +| 308 | 269 | 172 | 80 | + +| 宏昌物流园 | 路歌互联网物流平台 | 福佑卡车 | 普洛斯 | +| ---------- | ------------------ | -------- | ------ | +| 6816 | 182 | 18 | 150 | + +| 菜鸟速递 | 达达集团 | 满帮集团 | 货拉拉 | +| -------- | -------- | -------- | ------ | +| 1972 | 748 | 193 | 79 | + +前往 [更多](https://www.logclub.com/columnist/more/freight_transport) 查看更多企业 + +#### 证券交运 / 咨询机构 + +| 罗戈网 | 物流沙龙 | 罗戈研究 | 招商证券 | +| ------ | -------- | -------- | -------- | +| 17 | 21 | 26 | 51 | + +| 兴业证券 | 环球物流咨询规划 | 华创证券 | 艾瑞咨询 | +| -------- | ---------------- | -------- | -------- | +| 161 | 29 | 1287 | 58 | + +| 安信证券 | 天风证券 | 方正证券 | 中信证券 | +| -------- | -------- | -------- | -------- | +| 1295 | 1136 | 1169 | 469 | + +| 申万宏源证券 | 国海证券 | 华泰证券 | 东方证券 | +| ------------ | -------- | -------- | -------- | +| 1296 | 6381 | 2119 | 1772 | + +前往 [更多](https://www.logclub.com/columnist/more/securities_delivery) 查看更多企业 + +#### 资本 + +| 源码资本 | 华兴资本 | IDG 资本 | 元赋资本 | +| -------- | -------- | -------- | -------- | +| 1037 | 931 | 787 | 393 | + +| 钟鼎资本 | 红杉资本 | +| -------- | -------- | +| 159 | 5265 | + +前往 [更多](https://www.logclub.com/columnist/more/capital) 查看更多企业`, +}; diff --git a/lib/routes/logclub/index.ts b/lib/routes/logclub/index.ts index 708a46a93..19361bc22 100644 --- a/lib/routes/logclub/index.ts +++ b/lib/routes/logclub/index.ts @@ -2,24 +2,44 @@ import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; +import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { renderDescription } from './templates/description'; export const route: Route = { - path: '/:category{.+}?', - name: 'Unknown', - maintainers: [], + path: '/news/:id?', + categories: ['new-media'], + example: '/logclub/news', + parameters: { id: '资讯 id,见下表,可在对应资讯页 URL 中找到,默认为全部' }, + radar: [ + { + source: ['logclub.com/news'], + target: '/news', + }, + { + source: ['logclub.com/news/:id'], + target: '/news/:id', + }, + ], + name: '资讯', + maintainers: ['nczitzk'], handler, + description: `| 供应链 | 快递 | 快运 / 运输 | 仓储 / 地产 | 物流综合 | 国际与跨境物流 | 科技创新 | +| ------ | ---- | ----------- | ----------- | -------- | -------------- | -------- | +| 10-16 | 11 | 30 | 9 | 32 | 114 | 107 | + +| 绿色供应链 | 低碳物流 | 碳中和碳达峰 | +| ---------- | -------- | ------------ | +| 213 | 214 | 215 |`, }; -async function handler(ctx) { - const { category = 'news' } = ctx.req.param(); +export async function handler(ctx) { const limit = ctx.req.query('limit') ? Number(ctx.req.query('limit')) : 11; const rootUrl = 'https://www.logclub.com'; - const currentUrl = new URL(category, rootUrl).href; + const currentUrl = new URL(getSubPath(ctx), rootUrl).href; const { data: response } = await got(currentUrl); diff --git a/lib/routes/logclub/original.ts b/lib/routes/logclub/original.ts new file mode 100644 index 000000000..1d5bea157 --- /dev/null +++ b/lib/routes/logclub/original.ts @@ -0,0 +1,18 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/original', + categories: ['new-media'], + example: '/logclub/original', + radar: [ + { + source: ['logclub.com/original'], + target: '/original', + }, + ], + name: '原创', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/logclub/recruit.ts b/lib/routes/logclub/recruit.ts new file mode 100644 index 000000000..dcfcc2eac --- /dev/null +++ b/lib/routes/logclub/recruit.ts @@ -0,0 +1,18 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/recruit', + categories: ['new-media'], + example: '/logclub/recruit', + radar: [ + { + source: ['logclub.com/recruit'], + target: '/recruit', + }, + ], + name: '招聘', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/logclub/report.ts b/lib/routes/logclub/report.ts index 6e9d3c971..e293364e4 100644 --- a/lib/routes/logclub/report.ts +++ b/lib/routes/logclub/report.ts @@ -9,7 +9,7 @@ import timezone from '@/utils/timezone'; import { renderDescription } from './templates/description'; export const route: Route = { - path: ['/lc_report/:id?', '/report/:id?'], + path: '/lc_report/:id?', categories: ['new-media'], example: '/logclub/lc_report', parameters: { id: '报告 id,见下表,默认为罗戈研究出品' }, @@ -21,6 +21,27 @@ export const route: Route = { supportPodcast: false, supportScihub: false, }, + radar: [ + { + source: ['logclub.com/lc_report'], + target: '/lc_report', + }, + { + title: '报告 - 罗戈研究出品', + source: ['logclub.com/lc_report'], + target: '/lc_report/Report', + }, + { + title: '报告 - 物流报告', + source: ['logclub.com/lc_report'], + target: '/lc_report/IndustryReport', + }, + { + title: '报告 - 绿色双碳报告', + source: ['logclub.com/lc_report'], + target: '/lc_report/GreenDualCarbonReport', + }, + ], name: '报告', maintainers: ['nczitzk'], handler, diff --git a/lib/routes/logclub/tender.ts b/lib/routes/logclub/tender.ts new file mode 100644 index 000000000..ccc87fbbb --- /dev/null +++ b/lib/routes/logclub/tender.ts @@ -0,0 +1,18 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/tender', + categories: ['new-media'], + example: '/logclub/tender', + radar: [ + { + source: ['logclub.com/tender'], + target: '/tender', + }, + ], + name: '招投标', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/logonews/category.ts b/lib/routes/logonews/category.ts new file mode 100644 index 000000000..4987da8d0 --- /dev/null +++ b/lib/routes/logonews/category.ts @@ -0,0 +1,22 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/category/:category/:type', + categories: ['design'], + example: '/logonews/category/news/newsletter', + parameters: { category: '分类,可在对应分类页 URL 中找到', type: '类型,可在对应分类页 URL 中找到' }, + radar: [ + { + source: ['logonews.cn/category/:category/:type?'], + target: '/category/:category/:type?', + }, + ], + name: '文章分类', + maintainers: ['nczitzk'], + handler, + url: 'logonews.cn/', + description: + '如 [简讯 - 标志情报局](https://www.logonews.cn/category/news/newsletter) 的 URL 为 `https://www.logonews.cn/category/news/newsletter`,可得路由为 [`/logonews/category/news/newsletter`](https://rsshub.app/logonews/category/news/newsletter)。', +}; diff --git a/lib/routes/logonews/index.tsx b/lib/routes/logonews/index.tsx index 5e228c0d3..879c12122 100644 --- a/lib/routes/logonews/index.tsx +++ b/lib/routes/logonews/index.tsx @@ -9,25 +9,27 @@ import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { - path: ['/work/tags/:tag', '/tag/:tag', '*'], + path: '/', + categories: ['design'], + example: '/logonews', radar: [ { - source: ['logonews.cn/work/tags/:tag'], + source: ['logonews.cn/'], + target: '/', }, ], - name: 'Unknown', + name: '首页', maintainers: ['nczitzk'], handler, url: 'logonews.cn/', - description: '如 [中国 - 标志情报局](https://www.logonews.cn/tag/china) 的 URL 为 `https://www.logonews.cn/tag/china`,可得路由为 [`/logonews/tag/china`](https://rsshub.app/logonews/tag/china)。', }; -async function handler(ctx) { - const params = getSubPath(ctx); - const isWork = params.indexOf('/work') === 0; +export async function handler(ctx) { + const subPath = getSubPath(ctx); + const isWork = subPath.startsWith('/work'); const rootUrl = 'https://www.logonews.cn'; - const currentUrl = `${rootUrl}${params === '/' ? '' : params}`; + const currentUrl = subPath === '/' ? rootUrl : `${rootUrl}${subPath}`; const response = await got({ method: 'get', diff --git a/lib/routes/logonews/tag.ts b/lib/routes/logonews/tag.ts new file mode 100644 index 000000000..aa8c62d23 --- /dev/null +++ b/lib/routes/logonews/tag.ts @@ -0,0 +1,21 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/tag/:tag', + categories: ['design'], + example: '/logonews/tag/china', + parameters: { tag: '标签,可在对应标签页 URL 中找到' }, + radar: [ + { + source: ['logonews.cn/tag/:tag'], + target: '/tag/:tag', + }, + ], + name: '文章标签', + maintainers: ['nczitzk'], + handler, + url: 'logonews.cn/', + description: '如 [中国 - 标志情报局](https://www.logonews.cn/tag/china) 的 URL 为 `https://www.logonews.cn/tag/china`,可得路由为 [`/logonews/tag/china`](https://rsshub.app/logonews/tag/china)。', +}; diff --git a/lib/routes/logonews/work-category.ts b/lib/routes/logonews/work-category.ts new file mode 100644 index 000000000..6d3b98ac6 --- /dev/null +++ b/lib/routes/logonews/work-category.ts @@ -0,0 +1,22 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/work/categorys/:category', + categories: ['design'], + example: '/logonews/work/categorys/hotel-catering', + parameters: { category: '分类,可在对应分类页 URL 中找到' }, + radar: [ + { + source: ['logonews.cn/work/categorys/:category'], + target: '/work/categorys/:category', + }, + ], + name: '作品分类', + maintainers: ['nczitzk'], + handler, + url: 'logonews.cn/', + description: + '如 [LOGO 作品分类:酒店餐饮 - 标志情报局](https://www.logonews.cn/work/categorys/hotel-catering) 的 URL 为 `https://www.logonews.cn/work/categorys/hotel-catering`,可得路由为 [`/logonews/work/categorys/hotel-catering`](https://rsshub.app/logonews/work/categorys/hotel-catering)。', +}; diff --git a/lib/routes/logonews/work-tag.ts b/lib/routes/logonews/work-tag.ts new file mode 100644 index 000000000..89deb9cea --- /dev/null +++ b/lib/routes/logonews/work-tag.ts @@ -0,0 +1,22 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/work/tags/:tag?', + categories: ['design'], + example: '/logonews/work/tags/旅游', + parameters: { tag: '标签,可在对应标签页 URL 中找到' }, + radar: [ + { + source: ['logonews.cn/work/tags/:tag'], + target: '/work/tags/:tag', + }, + ], + name: '作品标签', + maintainers: ['nczitzk'], + handler, + url: 'logonews.cn/', + description: + '如 [LOGO 标签:旅游 - 标志情报局](https://www.logonews.cn/work/tags/旅游) 的 URL 为 [https://www.logonews.cn/work/tags/ 旅游](https://www.logonews.cn/work/tags/旅游),可得路由为 [`/logonews/work/tags/旅游`](https://rsshub.app/logonews/work/tags/旅游)。', +}; diff --git a/lib/routes/logonews/work.ts b/lib/routes/logonews/work.ts new file mode 100644 index 000000000..7af9fb85e --- /dev/null +++ b/lib/routes/logonews/work.ts @@ -0,0 +1,19 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/work', + categories: ['design'], + example: '/logonews/work', + radar: [ + { + source: ['logonews.cn/work'], + target: '/work', + }, + ], + name: '作品', + maintainers: ['nczitzk'], + handler, + url: 'logonews.cn/', +}; diff --git a/lib/routes/m4/index.ts b/lib/routes/m4/index.ts index 9dc97233b..4f42b5686 100644 --- a/lib/routes/m4/index.ts +++ b/lib/routes/m4/index.ts @@ -1,31 +1,45 @@ import { load } from 'cheerio'; -import InvalidParameterError from '@/errors/types/invalid-parameter'; import type { Route } from '@/types'; import cache from '@/utils/cache'; +import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -import { isValidHost } from '@/utils/valid-host'; import { renderDescription } from './templates/description'; export const route: Route = { - path: '/:id?/:category{.+}?', - name: 'Unknown', - maintainers: [], + path: '/news/:category?', + categories: ['new-media'], + example: '/m4/news/china', + parameters: { category: '分类,见下表,默认为国内新闻' }, + description: `| 分类 | ID | +| ------------------------------------- | ---------- | +| [国内新闻](http://news.m4.cn/china/) | china | +| [国际新闻](http://news.m4.cn/world/) | world | +| [民生](http://news.m4.cn/livelihood/) | livelihood | +| [社会](http://news.m4.cn/society/) | society | +| [财经](http://news.m4.cn/finance/) | finance | +| [科技](http://news.m4.cn/tech/) | tech |`, + radar: [ + { + source: ['news.m4.cn/:category', 'news.m4.cn/'], + target: '/news/:category', + }, + ], + name: '要闻', + maintainers: ['nczitzk'], handler, + url: 'news.m4.cn', }; -async function handler(ctx) { - const { id = 'news', category = 'china' } = ctx.req.param(); - if (!isValidHost(id)) { - throw new InvalidParameterError('Invalid id'); - } +export async function handler(ctx) { + const [id, category = 'china'] = getSubPath(ctx).split('/').filter(Boolean); const limit = ctx.req.query('limit') ? Number(ctx.req.query('limit')) : 30; const rootUrl = `http://${id}.m4.cn`; - const currentUrl = new URL(category ? `/${category.replace(/\/$/, '')}/` : '/', rootUrl).href; + const currentUrl = new URL(`/${category}/`, rootUrl).href; const { data: response } = await got(currentUrl); diff --git a/lib/routes/m4/mil.ts b/lib/routes/m4/mil.ts new file mode 100644 index 000000000..b46690537 --- /dev/null +++ b/lib/routes/m4/mil.ts @@ -0,0 +1,28 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/mil/:category?', + categories: ['new-media'], + example: '/m4/mil/china', + parameters: { category: '分类,见下表,默认为中国军情' }, + description: `| 分类 | ID | +| ------------------------------------- | ------- | +| [中国军情](http://mil.m4.cn/china/) | china | +| [国际军情](http://mil.m4.cn/world/) | world | +| [军事评论](http://mil.m4.cn/views/) | views | +| [军事历史](http://mil.m4.cn/history/) | history | +| [军迷说](http://mil.m4.cn/talk/) | talk | +| [武器库](http://mil.m4.cn/arms/) | arms |`, + radar: [ + { + source: ['mil.m4.cn/:category', 'mil.m4.cn/'], + target: '/mil/:category', + }, + ], + name: '军事', + maintainers: ['nczitzk'], + handler, + url: 'mil.m4.cn', +}; diff --git a/lib/routes/magazinelib/latest-magazine.tsx b/lib/routes/magazinelib/latest-magazine.tsx index a6eaee459..195e3a9f1 100644 --- a/lib/routes/magazinelib/latest-magazine.tsx +++ b/lib/routes/magazinelib/latest-magazine.tsx @@ -25,7 +25,7 @@ export const route: Route = { supportScihub: false, }, name: 'Latest Magazine', - maintainers: ['EthanWng97'], + maintainers: ['IvanWng97'], handler, description: 'For instance, when doing search at and you get url `https://magazinelib.com/?s=new+yorker`, the query is `new+yorker`', }; diff --git a/lib/routes/magnumphotos/magazine.ts b/lib/routes/magnumphotos/magazine.ts index 8d822668c..5f366c907 100644 --- a/lib/routes/magnumphotos/magazine.ts +++ b/lib/routes/magnumphotos/magazine.ts @@ -27,7 +27,7 @@ export const route: Route = { }, ], name: 'Magazine', - maintainers: ['EthanWng97'], + maintainers: ['IvanWng97'], handler, url: 'magnumphotos.com/', }; diff --git a/lib/routes/mail/imap.ts b/lib/routes/mail/imap.ts index c8cbdf9e9..f202958bd 100644 --- a/lib/routes/mail/imap.ts +++ b/lib/routes/mail/imap.ts @@ -10,8 +10,15 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/imap/:email/:folder{.+}?', - name: 'Unknown', - maintainers: [], + categories: ['other'], + example: '/mail/imap/rss@rsshub.app', + parameters: { + email: 'Email account', + folder: 'Inbox name, `INBOX` by default', + }, + description: 'Only support IMAP protocol, email password and other settings refer to [Route-specific Configurations](https://docs.rsshub.app/deploy/config#route-specific-configurations)', + name: 'Inbox', + maintainers: ['kt286'], handler, }; diff --git a/lib/routes/medieval-china/post.ts b/lib/routes/medieval-china/post.ts index 2933232b8..459716b3c 100644 --- a/lib/routes/medieval-china/post.ts +++ b/lib/routes/medieval-china/post.ts @@ -8,13 +8,15 @@ import timezone from '@/utils/timezone'; export const route: Route = { path: '/', + categories: ['reading'], + example: '/medieval-china', radar: [ { source: ['medieval-china.club/'], target: '', }, ], - name: 'Unknown', + name: '首页', maintainers: ['artefaritaKuniklo'], handler, url: 'medieval-china.club/', diff --git a/lib/routes/metacritic/index.tsx b/lib/routes/metacritic/index.tsx index 5b89cd630..358f31a4d 100644 --- a/lib/routes/metacritic/index.tsx +++ b/lib/routes/metacritic/index.tsx @@ -2,6 +2,7 @@ import { load } from 'cheerio'; import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; +import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -26,14 +27,36 @@ const renderDescription = (image, description, score) => ); export const route: Route = { - path: '/:type?/:sort?/:filter?', - name: 'Unknown', - maintainers: [], + path: '/game/:sort?/:filter?', + categories: ['new-media'], + example: '/metacritic/game', + parameters: { + sort: 'Sort, see below, `new` for Newest Releases by default', + filter: 'Filter', + }, + description: `| Metascore | User Score | Most Popular | Newest Releases | +| --------- | ---------- | ------------ | --------------- | +| metascore | userscore | popular | new | + +::: tip +The Filter parameter comes from the corresponding page URL. The following is an example: + +The URL of [Action Games to Play on PS5](https://www.metacritic.com/browse/game/all/all/all-time/new/?platform=ps5\\&genre=action) is \`https://www.metacritic.com/browse/game/all/all/all-time/new/?platform=ps5&genre=action\`. The Filter parameter is \`platform=ps5&genre=action\` and the route is [\`/metacritic/game/new/platform=ps5&genre=action\`](https://rsshub.app/metacritic/game/new/platform=ps5\\&genre=action) +:::`, + radar: [ + { + source: ['metacritic.com/browse/game/*'], + target: '/game', + }, + ], + name: 'Games', + maintainers: ['HenryQW', 'nczitzk'], handler, }; -async function handler(ctx) { - const { type = 'game', sort = 'new', filter } = ctx.req.param(); +export async function handler(ctx) { + const type = getSubPath(ctx).split('/', 2)[1]; + const { sort = 'new', filter } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number(ctx.req.query('limit')) : 50; const rootUrl = 'https://www.metacritic.com'; diff --git a/lib/routes/metacritic/movie.ts b/lib/routes/metacritic/movie.ts new file mode 100644 index 000000000..6e3651945 --- /dev/null +++ b/lib/routes/metacritic/movie.ts @@ -0,0 +1,31 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/movie/:sort?/:filter?', + categories: ['new-media'], + example: '/metacritic/movie', + parameters: { + sort: 'Sort, see below, `new` for Newest Releases by default', + filter: 'Filter', + }, + description: `| Metascore | User Score | Most Popular | Newest Releases | +| --------- | ---------- | ------------ | --------------- | +| metascore | userscore | popular | new | + +::: tip +The Filter parameter comes from the corresponding page URL. The following is an example: + +The URL of [Action Movies to Watch on Netflix](https://www.metacritic.com/browse/movie/all/all/all-time/new/?network=netflix\\&genre=action) is \`https://www.metacritic.com/browse/movie/all/all/all-time/new/?network=netflix&genre=action\`. The Filter parameter is \`network=netflix&genre=action\` and the route is [\`/metacritic/movie/new/network=netflix&genre=action\`](https://rsshub.app/metacritic/movie/new/network=netflix\\&genre=action) +:::`, + radar: [ + { + source: ['metacritic.com/browse/movie/*'], + target: '/movie', + }, + ], + name: 'Movies', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/metacritic/tv.ts b/lib/routes/metacritic/tv.ts new file mode 100644 index 000000000..a538c9d94 --- /dev/null +++ b/lib/routes/metacritic/tv.ts @@ -0,0 +1,31 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/tv/:sort?/:filter?', + categories: ['new-media'], + example: '/metacritic/tv', + parameters: { + sort: 'Sort, see below, `new` for Newest Releases by default', + filter: 'Filter', + }, + description: `| Metascore | User Score | Most Popular | Newest Releases | +| --------- | ---------- | ------------ | --------------- | +| metascore | userscore | popular | new | + +::: tip +The Filter parameter comes from the corresponding page URL. The following is an example: + +The URL of [Documentary TV Shows to Watch on Prime Video](https://www.metacritic.com/browse/tv/all/all/all-time/new/?network=prime-video\\&genre=documentary) is \`https://www.metacritic.com/browse/tv/all/all/all-time/new/?network=prime-video&genre=documentary\`. The Filter parameter is \`network=prime-video&genre=documentary\` and the route is [\`/metacritic/tv/new/network=prime-video&genre=documentary\`](https://rsshub.app/metacritic/tv/new/network=prime-video\\&genre=documentary) +:::`, + radar: [ + { + source: ['metacritic.com/browse/tv/*'], + target: '/tv', + }, + ], + name: 'TV Shows', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/metmuseum/exhibitions.ts b/lib/routes/metmuseum/exhibitions.ts index 7f1253552..5ca4e215e 100644 --- a/lib/routes/metmuseum/exhibitions.ts +++ b/lib/routes/metmuseum/exhibitions.ts @@ -14,8 +14,19 @@ function generateExhibitionItem(result) { export const route: Route = { path: '/exhibitions/:state?', - name: 'Unknown', - maintainers: [], + categories: ['travel'], + example: '/metmuseum/exhibitions', + parameters: { state: '展览进行的状态:`current` 对应展览当前正在进行,`past` 对应过去的展览,`upcoming` 对应即将举办的展览,默认为 `current`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Exhibitions', + maintainers: ['chazeon'], handler, }; diff --git a/lib/routes/nature/highlight.ts b/lib/routes/nature/highlight.ts index 1a3cdbbb5..2295abe1d 100644 --- a/lib/routes/nature/highlight.ts +++ b/lib/routes/nature/highlight.ts @@ -25,7 +25,7 @@ export const route: Route = { }, ], name: 'Research Highlight', - maintainers: [], + maintainers: ['y9c', 'TonyRL'], handler, description: `::: warning Only some journals are supported. diff --git a/lib/routes/nature/news-and-comment.ts b/lib/routes/nature/news-and-comment.ts index 71c6d3ff0..6908d0b55 100644 --- a/lib/routes/nature/news-and-comment.ts +++ b/lib/routes/nature/news-and-comment.ts @@ -20,15 +20,39 @@ import { baseUrl, cookieJar, getArticle, getArticleList } from './utils'; export const route: Route = { path: '/news-and-comment/:journal?', + categories: ['journal'], + example: '/nature/news-and-comment/ng', + parameters: { journal: 'short name for a journal' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: true, + }, radar: [ { source: ['nature.com/latest-news', 'nature.com/news', 'nature.com/'], target: '/news', }, ], - name: 'Unknown', + name: 'News & Comment', maintainers: ['y9c', 'TonyRL'], handler, + description: `| \`:journal\` | Full Name of the Journal | Route | +| :-----------: | :-------------------------: | -------------------------------------------------------------------------------------------------- | +| nbt | Nature Biotechnology | [/nature/news-and-comment/nbt](https://rsshub.app/nature/news-and-comment/nbt) | +| neuro | Nature Neuroscience | [/nature/news-and-comment/neuro](https://rsshub.app/nature/news-and-comment/neuro) | +| ng | Nature Genetics | [/nature/news-and-comment/ng](https://rsshub.app/nature/news-and-comment/ng) | +| ni | Nature Immunology | [/nature/news-and-comment/ni](https://rsshub.app/nature/news-and-comment/ni) | +| nmeth | Nature Method | [/nature/news-and-comment/nmeth](https://rsshub.app/nature/news-and-comment/nmeth) | +| nchem | Nature Chemistry | [/nature/news-and-comment/nchem](https://rsshub.app/nature/news-and-comment/nchem) | +| nmat | Nature Materials | [/nature/news-and-comment/nmat](https://rsshub.app/nature/news-and-comment/nmat) | +| natmachintell | Nature Machine Intelligence | [/nature/news-and-comment/natmachintell](https://rsshub.app/nature/news-and-comment/natmachintell) | + +- Using router (\`/nature/research/\` + "short name for a journal") to query latest research paper for a certain journal of Nature Publishing Group. +- The journals from NPG are run by different group of people, and the website of may not be consitent for all the journals`, url: 'nature.com/latest-news', }; diff --git a/lib/routes/ncwu/notice.ts b/lib/routes/ncwu/notice.ts index b2c5f6242..e66bcb292 100644 --- a/lib/routes/ncwu/notice.ts +++ b/lib/routes/ncwu/notice.ts @@ -25,7 +25,7 @@ export const route: Route = { }, ], name: '学校通知', - maintainers: [], + maintainers: ['vuhe'], handler, url: 'ncwu.edu.cn/xxtz.htm', }; diff --git a/lib/routes/nenu/sohac.ts b/lib/routes/nenu/sohac.ts index b9eb34cbf..557d62fc5 100644 --- a/lib/routes/nenu/sohac.ts +++ b/lib/routes/nenu/sohac.ts @@ -2,24 +2,31 @@ import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; -import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { - path: '/sohac/*', - name: 'Unknown', - maintainers: [], + path: '/sohac/:path{.+}?', + categories: ['university'], + example: '/nenu/sohac', + parameters: { path: '路径,默认为通知公告' }, + name: '历史文化学院', + maintainers: ['nczitzk'], handler, + description: `::: tip +若订阅 [通知公告](https://sohac.nenu.edu.cn/index/tzgg.htm),网址为 \`https://sohac.nenu.edu.cn/index/tzgg.htm\`。截取 \`https://sohac.nenu.edu.cn/\` 到末尾 \`.htm\` 的部分 \`index/tzgg\` 作为参数,此时路由为 [\`/nenu/sohac/index/tzgg\`](https://rsshub.app/nenu/sohac/index/tzgg)。 + +若订阅 [学院信息](https://sohac.nenu.edu.cn/index/xyxx.htm),网址为 \`https://sohac.nenu.edu.cn/index/xyxx.htm\`。截取 \`https://sohac.nenu.edu.cn/\` 到末尾 \`.htm\` 的部分 \`index/xyxx\` 作为参数,此时路由为 [\`/nenu/sohac/index/xyxx\`](https://rsshub.app/nenu/sohac/index/xyxx)。 +:::`, }; async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 10; - const path = getSubPath(ctx) === '/sohac' ? '/index/tzgg' : getSubPath(ctx).replace(/^\/sohac/, ''); + const path = ctx.req.param('path') ?? 'index/tzgg'; const rootUrl = 'https://sohac.nenu.edu.cn'; - const currentUrl = `${rootUrl}${path}.htm`; + const currentUrl = `${rootUrl}/${path}.htm`; const response = await got({ method: 'get', diff --git a/lib/routes/nenu/yjsy.ts b/lib/routes/nenu/yjsy.ts index 8b60a548d..8f6996f70 100644 --- a/lib/routes/nenu/yjsy.ts +++ b/lib/routes/nenu/yjsy.ts @@ -2,24 +2,31 @@ import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; -import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { - path: '/yjsy/*', - name: 'Unknown', - maintainers: [], + path: '/yjsy/:path{.+}?', + categories: ['university'], + example: '/nenu/yjsy', + parameters: { path: '路径,默认为通知公告' }, + name: '研究生院', + maintainers: ['nczitzk'], handler, + description: `::: tip +若订阅 [通知公告](https://yjsy.nenu.edu.cn/tzgg.htm),网址为 \`https://yjsy.nenu.edu.cn/tzgg.htm\`。截取 \`https://yjsy.nenu.edu.cn/\` 到末尾 \`.htm\` 的部分 \`tzgg\` 作为参数,此时路由为 [\`/nenu/yjsy/tzgg\`](https://rsshub.app/nenu/yjsy/tzgg)。 + +若订阅 [校内新闻](https://yjsy.nenu.edu.cn/xwdt/xnxw.htm),网址为 \`https://yjsy.nenu.edu.cn/xwdt/xnxw.htm\`。截取 \`https://yjsy.nenu.edu.cn/\` 到末尾 \`.htm\` 的部分 \`xwdt/xnxw\` 作为参数,此时路由为 [\`/nenu/yjsy/xwdt/xnxw\`](https://rsshub.app/nenu/yjsy/xwdt/xnxw)。 +:::`, }; async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 10; - const path = getSubPath(ctx) === '/yjsy' ? '/tzgg' : getSubPath(ctx).replace(/^\/yjsy/, ''); + const path = ctx.req.param('path') ?? 'tzgg'; const rootUrl = 'https://yjsy.nenu.edu.cn'; - const currentUrl = `${rootUrl}${path}.htm`; + const currentUrl = `${rootUrl}/${path}.htm`; const response = await got({ method: 'get', diff --git a/lib/routes/netflav/index.tsx b/lib/routes/netflav/index.tsx index 048f9dbcf..93470c383 100644 --- a/lib/routes/netflav/index.tsx +++ b/lib/routes/netflav/index.tsx @@ -7,13 +7,15 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/', + categories: ['multimedia'], + example: '/netflav', radar: [ { source: ['netflav.com/'], target: '', }, ], - name: 'Unknown', + name: 'Index', maintainers: ['TonyRL'], handler, url: 'netflav.com/', diff --git a/lib/routes/newyorker/news.ts b/lib/routes/newyorker/news.ts index 60ce2b651..156bab252 100644 --- a/lib/routes/newyorker/news.ts +++ b/lib/routes/newyorker/news.ts @@ -26,7 +26,7 @@ export const route: Route = { }, ], name: 'Articles', - maintainers: ['EthanWng97', 'pseudoyu'], + maintainers: ['IvanWng97', 'pseudoyu'], handler, }; diff --git a/lib/routes/niaogebiji/index.ts b/lib/routes/niaogebiji/index.ts index 121418e7e..d54b0c433 100644 --- a/lib/routes/niaogebiji/index.ts +++ b/lib/routes/niaogebiji/index.ts @@ -7,13 +7,15 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/', + categories: ['new-media'], + example: '/niaogebiji', radar: [ { source: ['niaogebiji.com/', 'niaogebiji.com/bulletin'], target: '', }, ], - name: 'Unknown', + name: '首页', maintainers: ['WenryXu'], handler, url: 'niaogebiji.com/', diff --git a/lib/routes/nintendo/eshop-cn.ts b/lib/routes/nintendo/eshop-cn.ts index cebe08c06..1b26032ad 100644 --- a/lib/routes/nintendo/eshop-cn.ts +++ b/lib/routes/nintendo/eshop-cn.ts @@ -10,13 +10,15 @@ const software_url = 'https://www.nintendoswitch.com.cn/software/'; export const route: Route = { path: '/eshop/cn', + categories: ['game'], + example: '/nintendo/eshop/cn', radar: [ { source: ['nintendoswitch.com.cn/software', 'nintendoswitch.com.cn/'], }, ], - name: 'Unknown', - maintainers: [], + name: 'eShop New Game Releases (CN)', + maintainers: ['HFO4'], handler, url: 'nintendoswitch.com.cn/software', }; diff --git a/lib/routes/nintendo/eshop-hk.ts b/lib/routes/nintendo/eshop-hk.ts index 4b4fd80f9..cc7222c51 100644 --- a/lib/routes/nintendo/eshop-hk.ts +++ b/lib/routes/nintendo/eshop-hk.ts @@ -9,13 +9,15 @@ import { renderEshopHkDescription } from './templates/eshop-hk'; export const route: Route = { path: '/eshop/hk', + categories: ['game'], + example: '/nintendo/eshop/hk', radar: [ { source: ['nintendo.com.hk/software/switch', 'nintendo.com.hk/'], }, ], - name: 'Unknown', - maintainers: [], + name: 'eShop New Game Releases (HK)', + maintainers: ['HFO4'], handler, url: 'nintendo.com.hk/software/switch', }; diff --git a/lib/routes/nintendo/eshop-jp.ts b/lib/routes/nintendo/eshop-jp.ts index 308387927..feabe3a13 100644 --- a/lib/routes/nintendo/eshop-jp.ts +++ b/lib/routes/nintendo/eshop-jp.ts @@ -6,13 +6,15 @@ import { renderEshopJpDescription } from './templates/eshop-jp'; export const route: Route = { path: '/eshop/jp', + categories: ['game'], + example: '/nintendo/eshop/jp', radar: [ { source: ['nintendo.co.jp/software/switch/index.html', 'nintendo.co.jp/'], }, ], - name: 'Unknown', - maintainers: [], + name: 'eShop New Game Releases (JP)', + maintainers: ['HFO4'], handler, url: 'nintendo.co.jp/software/switch/index.html', }; diff --git a/lib/routes/nintendo/eshop-us.ts b/lib/routes/nintendo/eshop-us.ts index 2fedf8e5f..a0e9684f4 100644 --- a/lib/routes/nintendo/eshop-us.ts +++ b/lib/routes/nintendo/eshop-us.ts @@ -5,13 +5,15 @@ import { renderEshopUsDescription } from './templates/eshop-us'; export const route: Route = { path: '/eshop/us', + categories: ['game'], + example: '/nintendo/eshop/us', radar: [ { source: ['nintendo.com/store/games', 'nintendo.com/'], }, ], - name: 'Unknown', - maintainers: [], + name: 'eShop New Game Releases (US)', + maintainers: ['HFO4'], handler, url: 'nintendo.com/store/games', }; diff --git a/lib/routes/nju/exchangesys.ts b/lib/routes/nju/exchangesys.ts index f4a2d2c74..18737a36f 100644 --- a/lib/routes/nju/exchangesys.ts +++ b/lib/routes/nju/exchangesys.ts @@ -17,7 +17,7 @@ export const route: Route = { supportScihub: false, }, name: '本科生交换生系统', - maintainers: [], + maintainers: ['cqjjjzr'], handler, description: `| 新闻通知 | 交换生项目 | | -------- | ---------- | diff --git a/lib/routes/nogizaka46/blog.ts b/lib/routes/nogizaka46/blog.ts index 394a81c37..d4d64001c 100644 --- a/lib/routes/nogizaka46/blog.ts +++ b/lib/routes/nogizaka46/blog.ts @@ -24,7 +24,7 @@ export const route: Route = { }, ], name: 'Nogizaka46 Blog 乃木坂 46 博客', - maintainers: ['Kasper4649', 'akashigakki'], + maintainers: ['Kasper4649', 'AkashiGakki'], handler, url: 'blog.nogizaka46.com/s/n46/diary/MEMBER', description: `Member ID diff --git a/lib/routes/nuaa/college/cae.ts b/lib/routes/nuaa/college/cae.ts index a9af61060..91a1f4f53 100644 --- a/lib/routes/nuaa/college/cae.ts +++ b/lib/routes/nuaa/college/cae.ts @@ -23,9 +23,15 @@ const map = new Map([ export const route: Route = { path: '/cae/:type/:getDescription?', - name: 'Unknown', + categories: ['university'], + example: '/nuaa/cae/zhxw', + parameters: { type: '分类名,见下表', getDescription: '是否获取全文' }, + name: '自动化学院', maintainers: ['Xm798'], handler, + description: `| 综合新闻 | 党委行政 | 人事 / 合作 | 研究生培养 | 本科生培养 | 学生工作 | 通知公告 | 学术信息 | 答辩公告 | +| -------- | -------- | ----------- | ---------- | ---------- | -------- | -------- | -------- | -------- | +| zhxw | dwxz | rshz | yjs | bks | xsgz | tzgg | xsxx | dbgg |`, }; async function handler(ctx) { diff --git a/lib/routes/nuist/library/lib.ts b/lib/routes/nuist/library/lib.ts index d037faeb8..919cc432e 100644 --- a/lib/routes/nuist/library/lib.ts +++ b/lib/routes/nuist/library/lib.ts @@ -10,12 +10,14 @@ const baseUrl = 'https://lib.nuist.edu.cn'; export const route: Route = { path: '/lib', + categories: ['university'], + example: '/nuist/lib', radar: [ { source: ['lib.nuist.edu.cn/', 'lib.nuist.edu.cn/index/tzgg.htm'], }, ], - name: 'Unknown', + name: '图书馆', maintainers: ['gylidian'], handler, url: 'lib.nuist.edu.cn/', diff --git a/lib/routes/nuist/yjs.ts b/lib/routes/nuist/yjs.ts index 3862be975..c57678bbc 100644 --- a/lib/routes/nuist/yjs.ts +++ b/lib/routes/nuist/yjs.ts @@ -2,20 +2,31 @@ import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; -import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; export const route: Route = { - path: '/yjs/*', - name: 'Unknown', - maintainers: [], + path: '/yjs/:path{.+}?', + categories: ['university'], + example: '/nuist/yjs/index/tzgg', + parameters: { path: '默认为通知公告' }, + description: `路径字段处填写的是对应南京信息工程大学研究生院学科建设处分类页网址中介于 **** 和 **.htm** 中间的一段。 + +如 [南京信息工程大学研究生院学科建设处工作动态](https://yjs.nuist.edu.cn/index/gzdt.htm) 的网址为 **** 和 **.htm** 中间的一段为 \`index/gzdt\`。可以得到路由为 [\`/nuist/yjs/index/gzdt\`](https://rsshub.app/nuist/yjs/index/gzdt) + +以下为部分分类: + +| 工作动态 | 通知公告 | 招生工作 | 培养与学位 | 学生工作 | +| ---------- | ---------- | --------- | ---------- | ---------- | +| index/gzdt | index/tzgg | zsgz/sszs | xwgz/xwtz | xsgz1/xzfc |`, + name: '研究生院学科建设处', + maintainers: ['gylidian', 'nczitzk'], handler, }; async function handler(ctx) { - const path = getSubPath(ctx) === '/yjs/' ? 'index/tzgg' : getSubPath(ctx).replace(/^\/yjs\//, ''); + const path = ctx.req.param('path') ?? 'index/tzgg'; const rootUrl = 'https://yjs.nuist.edu.cn'; const currentUrl = `${rootUrl}/${path}.htm`; diff --git a/lib/routes/oceanengine/arithmetic-index-toutiao.ts b/lib/routes/oceanengine/arithmetic-index-toutiao.ts new file mode 100644 index 000000000..9089f1d6a --- /dev/null +++ b/lib/routes/oceanengine/arithmetic-index-toutiao.ts @@ -0,0 +1,20 @@ +import type { Route } from '@/types'; + +import { handler } from './arithmetic-index'; + +export const route: Route = { + path: '/index/:keyword/toutiao', + categories: ['other'], + example: '/oceanengine/index/教材/toutiao', + parameters: { + keyword: '热点关键词', + }, + description: '爬取巨量算数近 6 个月的头条指数,解密后提取指数波峰当日的热门搜索关键词,生成为 RSS。可用于追踪新闻热点事件。', + features: { + requirePuppeteer: true, + antiCrawler: true, + }, + name: '头条指数波峰', + maintainers: ['Jkker'], + handler, +}; diff --git a/lib/routes/oceanengine/arithmetic-index.tsx b/lib/routes/oceanengine/arithmetic-index.tsx index df1323fe2..e32d6352e 100644 --- a/lib/routes/oceanengine/arithmetic-index.tsx +++ b/lib/routes/oceanengine/arithmetic-index.tsx @@ -3,6 +3,7 @@ import { createDecipheriv } from 'node:crypto'; import dayjs from 'dayjs'; import { raw } from 'hono/html'; import { renderToString } from 'hono/jsx/dom/server'; +import { routePath } from 'hono/route'; import { config } from '@/config'; import InvalidParameterError from '@/errors/types/invalid-parameter'; @@ -85,13 +86,23 @@ const createContent = (keyword, queryList, queryListText) => ); export const route: Route = { - path: '/index/:keyword/:channel?', - name: 'Unknown', + path: '/index/:keyword', + categories: ['other'], + example: '/oceanengine/index/教材', + parameters: { + keyword: '热点关键词', + }, + description: '爬取巨量算数近 6 个月的抖音指数,解密后提取指数波峰当日的热门搜索关键词,生成为 RSS。可用于追踪新闻热点事件。', + features: { + requirePuppeteer: true, + antiCrawler: true, + }, + name: '抖音指数波峰', maintainers: ['Jkker'], handler, }; -async function handler(ctx) { +export async function handler(ctx) { const now = dayjs(); const start_date = now.subtract(DEFAULT_FETCH_DURATION_MONTH, 'month').format('YYYYMMDD'); const end_date = now.format('YYYYMMDD'); @@ -99,12 +110,10 @@ async function handler(ctx) { if (!keyword) { throw new InvalidParameterError('Invalid keyword'); } - if (ctx.req.param('channel') && !['douyin', 'toutiao'].includes(ctx.req.param('channel'))) { - throw new InvalidParameterError('Invalid channel。 Only support `douyin` or `toutiao`'); - } + const isToutiao = routePath(ctx) === '/oceanengine/index/:keyword/toutiao'; - const channel = ctx.req.param('channel') === 'toutiao' ? 'toutiao' : 'aweme'; // default channel is `douyin` - const channelName = ctx.req.param('channel') === 'toutiao' ? '头条' : '抖音'; + const channel = isToutiao ? 'toutiao' : 'aweme'; + const channelName = isToutiao ? '头条' : '抖音'; const link = `https://trendinsight.oceanengine.com/arithmetic-index/analysis?keyword=${keyword}&appName=${channel}`; diff --git a/lib/routes/oeeee/app/channel.ts b/lib/routes/oeeee/app/channel.ts index 12453f86e..a7557ab06 100644 --- a/lib/routes/oeeee/app/channel.ts +++ b/lib/routes/oeeee/app/channel.ts @@ -8,9 +8,21 @@ import { parseArticle } from '../utils'; export const route: Route = { path: '/app/channel/:id', - name: 'Unknown', + categories: ['traditional-media'], + example: '/oeeee/app/channel/50', + parameters: { id: '南都号 ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '南都客户端(按南都号 ID)', maintainers: ['TimWu007'], handler, + description: '南都号的 UID 可通过 `m.mp.oeeee.com` 下的文章页面获取。点击文章上方的南都号头像,进入该南都号的个人主页,即可从 url 中获取。', }; async function handler(ctx) { diff --git a/lib/routes/oesw/index.ts b/lib/routes/oesw/index.ts index b49e6a076..c6d0a1c75 100644 --- a/lib/routes/oesw/index.ts +++ b/lib/routes/oesw/index.ts @@ -1,7 +1,6 @@ import { load } from 'cheerio'; import type { Data, DataItem, Route } from '@/types'; -import { getSubPath } from '@/utils/common-utils'; import ofetch from '@/utils/ofetch'; const FEED_LANGUAGE = 'de' as const; @@ -12,17 +11,18 @@ const BASE_URL = `${SITE_URL}/immobilienangebot/` as const; export const route: Route = { name: 'Immobilienangebot', example: '/oesw/sofort-verfuegbar/objectType=1&financingType=2®ion=1020', - path: '*', + path: '/:path{.+}?', + parameters: { path: 'Listing page (`immobiliensuche` by default), optionally followed by the query parameters, see the description below' }, maintainers: ['sk22'], categories: ['other'], description: `Get your parameters on ${SITE_URL} under "Immobilienangebot". Make sure to remove the \`?\` at the beginning from the query parameters!`, async handler(ctx) { - // ['', 'sofort-verfuegbar', 'objectType=1®ion=1010'] - const parts = getSubPath(ctx).split('/'); - const listingPage = parts[1] || 'immobiliensuche'; - let params = parts[2] || ''; + // ['sofort-verfuegbar', 'objectType=1®ion=1010'] + const parts = (ctx.req.param('path') ?? '').split('/'); + const listingPage = parts[0] || 'immobiliensuche'; + let params = parts[1] || ''; if (params.startsWith('&')) { params = params.slice(1); } diff --git a/lib/routes/onehu/common.ts b/lib/routes/onehu/common.ts index e5c3899d9..ddc5e3091 100644 --- a/lib/routes/onehu/common.ts +++ b/lib/routes/onehu/common.ts @@ -7,7 +7,9 @@ import timezone from '@/utils/timezone'; export const route: Route = { path: '/', - name: 'Unknown', + categories: ['new-media'], + example: '/onehu', + name: '首页', maintainers: ['ruoshui9527'], handler, }; diff --git a/lib/routes/openwrt/releases.ts b/lib/routes/openwrt/releases.ts index f20223a9d..8c8532aeb 100644 --- a/lib/routes/openwrt/releases.ts +++ b/lib/routes/openwrt/releases.ts @@ -5,14 +5,20 @@ import got from '@/utils/got'; export const route: Route = { path: '/releases/:brand/:model', + categories: ['program-update'], + example: '/openwrt/releases/xiaomi/xiaomi_redmi_router_ac2100', + parameters: { + brand: 'Device Model, can be found in url of `Table of Hardware` -> `Device Page`', + model: 'Same as above', + }, radar: [ { source: ['openwrt.org/toh/:band/:model'], target: '/releases/:model', }, ], - name: 'Unknown', - maintainers: [], + name: 'Releases', + maintainers: ['DIYgod'], handler, }; diff --git a/lib/routes/patagonia/new-arrivals.tsx b/lib/routes/patagonia/new-arrivals.tsx index 1254bffdb..feb54f457 100644 --- a/lib/routes/patagonia/new-arrivals.tsx +++ b/lib/routes/patagonia/new-arrivals.tsx @@ -31,7 +31,7 @@ export const route: Route = { supportScihub: false, }, name: 'New Arrivals', - maintainers: [], + maintainers: ['IvanWng97'], handler, description: `| Men's | Women's | Kids' & Baby | Packs & Gear | | ----- | ------- | ------------ | ------------ | diff --git a/lib/routes/people/xjpjh.ts b/lib/routes/people/xjpjh.ts index b34d6a497..1f5b8ec3c 100644 --- a/lib/routes/people/xjpjh.ts +++ b/lib/routes/people/xjpjh.ts @@ -26,7 +26,7 @@ export const route: Route = { }, ], name: '习近平系列重要讲话', - maintainers: [], + maintainers: ['LogicJake'], handler, url: 'people.com.cn/', }; diff --git a/lib/routes/peopo/topic.ts b/lib/routes/peopo/topic.ts index 332a3047d..bed66d868 100644 --- a/lib/routes/peopo/topic.ts +++ b/lib/routes/peopo/topic.ts @@ -28,7 +28,7 @@ export const route: Route = { }, ], name: '新聞分類', - maintainers: [], + maintainers: ['TonyRL'], handler, description: `| 分類 | ID | | -------- | --- | diff --git a/lib/routes/pianyuan/search.ts b/lib/routes/pianyuan/search.ts index 7262811a4..db563ad1c 100644 --- a/lib/routes/pianyuan/search.ts +++ b/lib/routes/pianyuan/search.ts @@ -7,16 +7,19 @@ import utils from './utils'; export const route: Route = { path: '/indexers/pianyuan/results/search/api', + categories: ['multimedia'], + example: '/pianyuan/indexers/pianyuan/results/search/api?t=test&q=长津湖', radar: [ { source: ['pianyuan.org/'], target: '/index', }, ], - name: 'Unknown', + name: '搜索', maintainers: ['jerry1119'], handler, url: 'pianyuan.org/', + description: '搜索路由模仿 jackett 的搜索 api, 以提供给 nastools 使用,填写在 nastools 配置 indexer 中', }; async function handler(ctx) { diff --git a/lib/routes/pikabu/community.ts b/lib/routes/pikabu/community.ts index da009163d..df481f08f 100644 --- a/lib/routes/pikabu/community.ts +++ b/lib/routes/pikabu/community.ts @@ -1,20 +1,31 @@ import { load } from 'cheerio'; import type { Route } from '@/types'; +import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { baseUrl, fixImage, fixVideo } from './utils'; export const route: Route = { - path: '/:type/:name', - name: 'Unknown', - maintainers: [], + path: '/community/:name', + categories: ['bbs'], + example: '/pikabu/community/real_true_story', + parameters: { name: 'Community name' }, + radar: [ + { + source: ['pikabu.ru/community/:name'], + target: '/community/:name', + }, + ], + name: 'Community', + maintainers: ['TonyRL'], handler, }; -async function handler(ctx) { - const { type, name, sort = 'new' } = ctx.req.param(); +export async function handler(ctx) { + const { name, sort = 'new' } = ctx.req.param(); + const type = getSubPath(ctx).split('/', 2)[1]; const sortString = sort === 'default' || type === 'tag' ? '' : `/${sort}`; const { data: response } = await got(`${baseUrl}/ajax/${type}/${name}${sortString}`); diff --git a/lib/routes/pikabu/tag.ts b/lib/routes/pikabu/tag.ts new file mode 100644 index 000000000..e3dcd77fe --- /dev/null +++ b/lib/routes/pikabu/tag.ts @@ -0,0 +1,19 @@ +import type { Route } from '@/types'; + +import { handler } from './community'; + +export const route: Route = { + path: '/tag/:name', + categories: ['bbs'], + example: '/pikabu/tag/Metallica', + parameters: { name: 'Tag name' }, + radar: [ + { + source: ['pikabu.ru/tag/:name'], + target: '/tag/:name', + }, + ], + name: 'Tag', + maintainers: ['TonyRL'], + handler, +}; diff --git a/lib/routes/pincong/topic.ts b/lib/routes/pincong/topic.ts index 2fa0b2af1..904c7cec4 100644 --- a/lib/routes/pincong/topic.ts +++ b/lib/routes/pincong/topic.ts @@ -8,12 +8,23 @@ import { baseUrl, playwrightGet } from './utils'; export const route: Route = { path: '/topic/:topic', + categories: ['bbs'], + example: '/pincong/topic/美国', + parameters: { topic: '话题,可在官网获取' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, radar: [ { source: ['pincong.rocks/topic/:topic'], }, ], - name: 'Unknown', + name: '话题', maintainers: ['zphw'], handler, }; diff --git a/lib/routes/pku/ss/notice.ts b/lib/routes/pku/ss/notice.ts index 38fdb5c01..b84a092f4 100644 --- a/lib/routes/pku/ss/notice.ts +++ b/lib/routes/pku/ss/notice.ts @@ -6,12 +6,23 @@ const host = `${baseUrl}/newscenter/notice/`; export const route: Route = { path: '/ss/notice', + categories: ['university'], + example: '/pku/ss/notice', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, radar: [ { source: ['ss.pku.edu.cn/index.php/newscenter/notice', 'ss.pku.edu.cn/'], }, ], - name: 'Unknown', + name: '软件与微电子学院 - 通知公告', maintainers: ['legr4ndk'], handler, url: 'ss.pku.edu.cn/index.php/newscenter/notice', diff --git a/lib/routes/pnas/index.tsx b/lib/routes/pnas/index.tsx index 101e0a22a..da79b94e3 100644 --- a/lib/routes/pnas/index.tsx +++ b/lib/routes/pnas/index.tsx @@ -13,16 +13,29 @@ import { setCookies } from '@/utils/playwright-utils'; export const route: Route = { path: '/:topicPath{.+}?', + categories: ['journal'], + example: '/pnas/latest', + parameters: { + topicPath: 'Topic path, support **Featured Topics**, **Articles By Topic** and [**Collected Papers**](https://www.pnas.org/about/collected-papers), `latest` by default', + }, + features: { + requirePuppeteer: true, + antiCrawler: true, + supportScihub: true, + }, radar: [ { source: ['pnas.org/*topicPath'], target: '/:topicPath', }, ], - name: 'Unknown', - maintainers: [], + name: 'Journal', + maintainers: ['emdoe', 'HenryQW', 'y9c'], handler, url: 'pnas.org/*topicPath', + description: `::: tip +Some topics require adding \`topic/\` to \`topicPath\` like [\`/pnas/topic/app-math\`](https://rsshub.app/pnas/topic/app-math) and some don't like [\`/pnas/biophysics-and-computational-biology\`](https://rsshub.app/pnas/biophysics-and-computational-biology) +:::`, }; async function handler(ctx) { diff --git a/lib/routes/pts/category.ts b/lib/routes/pts/category.ts new file mode 100644 index 000000000..6a746b03b --- /dev/null +++ b/lib/routes/pts/category.ts @@ -0,0 +1,38 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/category/:id', + categories: ['traditional-media'], + example: '/pts/category/9', + parameters: { id: '分類 id,见下表,可在对应分類页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['news.pts.org.tw/category/:id', 'news.pts.org.tw/'], + }, + ], + description: `| 名称 | 编号 | +| -------- | ---- | +| 政治 | 1 | +| 社會 | 7 | +| 全球 | 4 | +| 生活 | 5 | +| 兩岸 | 9 | +| 地方 | 11 | +| 產經 | 10 | +| 文教科技 | 6 | +| 環境 | 3 | +| 社福人權 | 12 |`, + name: '分類', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/pts/index.ts b/lib/routes/pts/index.ts index fb07c1626..da6dad56d 100644 --- a/lib/routes/pts/index.ts +++ b/lib/routes/pts/index.ts @@ -10,15 +10,32 @@ import timezone from '@/utils/timezone'; import { renderDescription } from './templates/description'; export const route: Route = { - path: '*', - name: 'Unknown', - maintainers: [], + path: '/dailynews', + categories: ['traditional-media'], + example: '/pts/dailynews', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['news.pts.org.tw/dailynews', 'news.pts.org.tw/'], + }, + ], + name: '即時新聞', + maintainers: ['nczitzk'], handler, + url: 'news.pts.org.tw/dailynews', }; -async function handler(ctx) { +export async function handler(ctx) { const rootUrl = 'https://news.pts.org.tw'; - const currentUrl = `${rootUrl}${getSubPath(ctx) === '/' ? '/dailynews' : getSubPath(ctx)}`; + const currentUrl = `${rootUrl}${getSubPath(ctx)}`; const response = await got({ method: 'get', diff --git a/lib/routes/pts/live.ts b/lib/routes/pts/live.ts index ac9deb5ee..7d2f4b1cb 100644 --- a/lib/routes/pts/live.ts +++ b/lib/routes/pts/live.ts @@ -24,7 +24,7 @@ export const route: Route = { }, ], name: '整理報導', - maintainers: [], + maintainers: ['nczitzk'], handler, }; diff --git a/lib/routes/pts/opinion.ts b/lib/routes/pts/opinion.ts new file mode 100644 index 000000000..3ddfd9ddf --- /dev/null +++ b/lib/routes/pts/opinion.ts @@ -0,0 +1,27 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/opinion', + categories: ['traditional-media'], + example: '/pts/opinion', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['news.pts.org.tw/opinion', 'news.pts.org.tw/'], + }, + ], + name: '觀點', + maintainers: ['nczitzk'], + handler, + url: 'news.pts.org.tw/opinion', +}; diff --git a/lib/routes/pts/report.ts b/lib/routes/pts/report.ts new file mode 100644 index 000000000..dcb0dd080 --- /dev/null +++ b/lib/routes/pts/report.ts @@ -0,0 +1,27 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/report', + categories: ['traditional-media'], + example: '/pts/report', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['news.pts.org.tw/report', 'news.pts.org.tw/'], + }, + ], + name: '深度報導', + maintainers: ['nczitzk'], + handler, + url: 'news.pts.org.tw/report', +}; diff --git a/lib/routes/pts/tag.ts b/lib/routes/pts/tag.ts new file mode 100644 index 000000000..9b18313c8 --- /dev/null +++ b/lib/routes/pts/tag.ts @@ -0,0 +1,26 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/tag/:id', + categories: ['traditional-media'], + example: '/pts/tag/230', + parameters: { id: '標籤 id,可在对应標籤页 URL 中找到' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['news.pts.org.tw/tag/:id', 'news.pts.org.tw/'], + }, + ], + name: '標籤', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/pubmed/trending.tsx b/lib/routes/pubmed/trending.tsx index 8897a7aa3..16ab269bb 100644 --- a/lib/routes/pubmed/trending.tsx +++ b/lib/routes/pubmed/trending.tsx @@ -9,9 +9,17 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/trending/:filters?', - name: 'Unknown', - maintainers: ['nczitzk'], + categories: ['journal'], + example: '/pubmed/trending', + parameters: { filters: 'Filters, can be found in URL' }, + name: 'Trending articles', + maintainers: ['y9c', 'nczitzk'], handler, + description: `::: tip +For the parameter **filter**, the \`filter\` parameter in the URL should be split into a string by \`,\`, here is an example. + +In \`https://pubmed.ncbi.nlm.nih.gov/trending/?filter=simsearch1.fha&filter=pubt.clinicaltrial&filter=pubt.randomizedcontrolledtrial\`, the filter parameters are \`simsearch1.fha\`, \`pubt.clinicaltrial\`, and \`pubt.randomizedcontrolledtrial\`. Therefore, the filter corresponding to the route should be filled with \`simsearch1.fha,pubt.clinicaltrial,pubt.randomizedcontrolledtrial\`, and the route is [\`/pubmed/trending/simsearch1.fha,pubt.clinicaltrial,pubt.randomizedcontrolledtrial\`](https://rsshub.app/pubmed/trending/simsearch1.fha,pubt.clinicaltrial,pubt.randomizedcontrolledtrial) +:::`, }; async function handler(ctx) { diff --git a/lib/routes/qianp/news.ts b/lib/routes/qianp/news.ts index 5efe5b1cd..bd0593ef0 100644 --- a/lib/routes/qianp/news.ts +++ b/lib/routes/qianp/news.ts @@ -9,8 +9,11 @@ import { getTokenAndSecret } from './utils'; export const route: Route = { path: '/news/:path{.+}?', - name: 'Unknown', - maintainers: [], + categories: ['new-media'], + example: '/qianp/news', + parameters: { path: '路径,可在URL中找到,默认为 `news/recommend`' }, + name: '知识库/资讯', + maintainers: ['TonyRL'], handler, }; diff --git a/lib/routes/qiyoujiage/price.ts b/lib/routes/qiyoujiage/price.ts index 10cdc51e3..c7afcb2f1 100644 --- a/lib/routes/qiyoujiage/price.ts +++ b/lib/routes/qiyoujiage/price.ts @@ -6,8 +6,16 @@ import md5 from '@/utils/md5'; export const route: Route = { path: '/:path{.+}', - name: 'Unknown', - maintainers: [], + categories: ['other'], + example: '/qiyoujiage/shanghai', + parameters: { path: '路径' }, + description: `::: tip +路径处填写对应页面 URL 中 \`http://www.qiyoujiage.com/\` 和 \`.shtml\` 之间的字段。下面是一个例子。 + +若订阅 [福建漳州龙海今日油价](http://www.qiyoujiage.com/fujian/zhangzhou/longhai.shtml) 则将对应页面 URL 中 \`http://www.qiyoujiage.com/\` 和 \`.shtml\` 之间的字段 \`fujian/zhangzhou/longhai\` 作为路径填入。此时路由为 [\`/qiyoujiage/fujian/zhangzhou/longhai\`](https://rsshub.app/qiyoujiage/fujian/zhangzhou/longhai) +:::`, + name: '今日油价查询', + maintainers: ['TonyRL'], handler, }; diff --git a/lib/routes/qoo-app/notes/topic.ts b/lib/routes/qoo-app/notes/topic.ts index 178011db1..c60ebd190 100644 --- a/lib/routes/qoo-app/notes/topic.ts +++ b/lib/routes/qoo-app/notes/topic.ts @@ -7,7 +7,18 @@ import { extractNotes, notesUrl } from '../utils'; export const route: Route = { path: '/notes/:lang?/topic/:topic', - name: 'Unknown', + categories: ['anime'], + example: '/qoo-app/notes/en/topic/QooAppGacha', + parameters: { lang: 'Language, see the table above, empty means `中文`', topic: 'Hashtag name without `#`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Hot Hashtags', maintainers: ['TonyRL'], handler, }; diff --git a/lib/routes/qq/ac/comic.ts b/lib/routes/qq/ac/comic.ts index ceaccc0c3..be30a37e3 100644 --- a/lib/routes/qq/ac/comic.ts +++ b/lib/routes/qq/ac/comic.ts @@ -7,14 +7,19 @@ import { mobileRootUrl, rootUrl } from './utils'; export const route: Route = { path: '/ac/comic/:id?', + categories: ['anime'], + example: '/qq/ac/comic/531490', + parameters: { + id: '编号,可在对应页 URL 中找到', + }, radar: [ { source: ['ac.qq.com/Comic/ComicInfo/id/:id', 'ac.qq.com/'], target: '/ac/comic/:id', }, ], - name: 'Unknown', - maintainers: [], + name: '漫画', + maintainers: ['nczitzk'], handler, }; diff --git a/lib/routes/quicker/versions.ts b/lib/routes/quicker/versions.ts index 9cf62a0e3..03146ff2d 100644 --- a/lib/routes/quicker/versions.ts +++ b/lib/routes/quicker/versions.ts @@ -5,8 +5,10 @@ import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { - path: ['/update', '/versions'], - name: 'Unknown', + path: '/versions', + categories: ['program-update'], + example: '/quicker/versions', + name: '版本更新', maintainers: ['Cesaryuan', 'nczitzk'], handler, url: 'getquicker.net/Help/Versions', diff --git a/lib/routes/rarehistoricalphotos/index.ts b/lib/routes/rarehistoricalphotos/index.ts index f569de4c9..c26a83b56 100644 --- a/lib/routes/rarehistoricalphotos/index.ts +++ b/lib/routes/rarehistoricalphotos/index.ts @@ -6,13 +6,15 @@ const baseUrl = 'https://rarehistoricalphotos.com'; export const route: Route = { path: '/', + categories: ['picture'], + example: '/rarehistoricalphotos', radar: [ { source: ['rarehistoricalphotos.com/'], target: '', }, ], - name: 'Unknown', + name: 'Home', maintainers: ['TonyRL'], handler, url: 'rarehistoricalphotos.com/', diff --git a/lib/routes/reactnewsletter/reactnewsletter.ts b/lib/routes/reactnewsletter/reactnewsletter.ts index e8d908771..dcf09a003 100644 --- a/lib/routes/reactnewsletter/reactnewsletter.ts +++ b/lib/routes/reactnewsletter/reactnewsletter.ts @@ -8,13 +8,16 @@ const currentURL = 'https://reactnewsletter.com/issues'; export const route: Route = { path: '/', + categories: ['programming'], + example: '/reactnewsletter', radar: [ { source: ['bytes.dev/issues', 'bytes.dev/'], target: '', }, ], - name: 'Unknown', + name: 'React Newsletter', + description: 'Stay up to date on the latest React news, tutorials, resources, and more. Delivered every Tuesday, for free.', maintainers: ['meixger'], handler, url: 'bytes.dev/issues', diff --git a/lib/routes/researchgate/publications.ts b/lib/routes/researchgate/publications.ts index 3d34f586f..d654e45a8 100644 --- a/lib/routes/researchgate/publications.ts +++ b/lib/routes/researchgate/publications.ts @@ -7,14 +7,21 @@ import playwright from '@/utils/playwright'; export const route: Route = { path: '/publications/:id', + categories: ['study'], + example: '/researchgate/publications/Somsak-Panha', + parameters: { id: 'Username, can be found in URL' }, + features: { + requirePuppeteer: true, + antiCrawler: true, + }, radar: [ { source: ['researchgate.net/profile/:username'], target: '/publications/:username', }, ], - name: 'Unknown', - maintainers: [], + name: 'Publications', + maintainers: ['nczitzk'], handler, }; diff --git a/lib/routes/routledge/book-series.tsx b/lib/routes/routledge/book-series.tsx index 2385837a7..1aa5e17b5 100644 --- a/lib/routes/routledge/book-series.tsx +++ b/lib/routes/routledge/book-series.tsx @@ -9,12 +9,18 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/:bookName/book-series/:bookId', + categories: ['journal'], + example: '/routledge/A-Colour-Atlas/book-series/CRCACOLOATLA', + parameters: { + bookName: 'Book name, can be found in URL', + bookId: 'Book ID, can be found in URL', + }, radar: [ { source: ['routledge.com/:bookName/book-series/:bookId'], }, ], - name: 'Unknown', + name: 'Book Series', maintainers: ['TonyRL'], handler, }; diff --git a/lib/routes/rsshub/transform/sitemap.ts b/lib/routes/rsshub/transform/sitemap.ts index d10d856a2..bba12872a 100644 --- a/lib/routes/rsshub/transform/sitemap.ts +++ b/lib/routes/rsshub/transform/sitemap.ts @@ -7,8 +7,29 @@ import got from '@/utils/got'; export const route: Route = { path: '/transform/sitemap/:url/:routeParams?', - name: 'Unknown', + categories: ['other'], + example: '/rsshub/transform/sitemap/https%3A%2F%2Fwww.sitemaps.org%2Fsitemap.xml', + parameters: { url: '`encodeURIComponent`ed URL address', routeParams: 'Transformation rules, requires URL encode' }, + features: { + requireConfig: [ + { + name: 'ALLOW_USER_SUPPLY_UNSAFE_DOMAIN', + description: '', + }, + ], + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Transformation - Sitemap', maintainers: ['flrngel'], + description: `Specify options (in the format of query string) in parameter \`routeParams\` parameter to extract data from Sitemap. (Follows Sitemap Protocol 0.9) + +| Key | Meaning | Accepted Values | Default | +| ------- | -------------------- | --------------- | -------------------------------- | +| \`title\` | The title of the RSS | \`string\` | The first \`\` in the sitemap |`, handler, }; diff --git a/lib/routes/ruancan/category.ts b/lib/routes/ruancan/category.ts index dbee93f04..f9abc94d7 100644 --- a/lib/routes/ruancan/category.ts +++ b/lib/routes/ruancan/category.ts @@ -6,7 +6,7 @@ export const route: Route = { path: '/category/:category?', categories: ['new-media'], example: '/ruancan/category/news', - parameters: { category: '分类 id,可在对应分类页 URL 中找到,默认为业界' }, + parameters: { category: '分类 id,可在对应分类页 URL 中找到' }, features: { requireConfig: false, requirePuppeteer: false, @@ -22,7 +22,7 @@ export const route: Route = { }, ], name: '分类', - maintainers: [], + maintainers: ['nczitzk'], handler, url: 'ruancan.com/', }; diff --git a/lib/routes/ruancan/index.ts b/lib/routes/ruancan/index.ts index 9647f0a77..5310eb9cd 100644 --- a/lib/routes/ruancan/index.ts +++ b/lib/routes/ruancan/index.ts @@ -4,14 +4,16 @@ import { fetchFeed } from './utils'; export const route: Route = { path: '/', + categories: ['new-media'], + example: '/ruancan', radar: [ { source: ['ruancan.com/'], target: '', }, ], - name: 'Unknown', - maintainers: [], + name: '首页', + maintainers: ['nczitzk'], handler, url: 'ruancan.com/', }; diff --git a/lib/routes/ruancan/search.ts b/lib/routes/ruancan/search.ts index 7a5ffe4d7..00b6827e5 100644 --- a/lib/routes/ruancan/search.ts +++ b/lib/routes/ruancan/search.ts @@ -6,7 +6,7 @@ export const route: Route = { path: '/search/:keyword?', categories: ['new-media'], example: '/ruancan/search/Windows', - parameters: { keyword: '关键字,默认为空' }, + parameters: { keyword: '关键字' }, features: { requireConfig: false, requirePuppeteer: false, @@ -22,7 +22,7 @@ export const route: Route = { }, ], name: '搜索', - maintainers: [], + maintainers: ['nczitzk'], handler, url: 'ruancan.com/', }; diff --git a/lib/routes/ruancan/user.ts b/lib/routes/ruancan/user.ts index 6ed3d3f08..2b1697cc2 100644 --- a/lib/routes/ruancan/user.ts +++ b/lib/routes/ruancan/user.ts @@ -4,13 +4,16 @@ import { fetchFeed } from './utils'; export const route: Route = { path: '/user/:id', + categories: ['new-media'], + example: '/ruancan/user/72', + parameters: { id: '用户 id,可在对应用户页 URL 中找到' }, radar: [ { source: ['ruancan.com/i/:id', 'ruancan.com/'], }, ], - name: 'Unknown', - maintainers: [], + name: '用户文章', + maintainers: ['nczitzk'], handler, url: 'ruancan.com/', }; diff --git a/lib/routes/sakurazaka46/blog.ts b/lib/routes/sakurazaka46/blog.ts index 186940281..e5a08dab5 100644 --- a/lib/routes/sakurazaka46/blog.ts +++ b/lib/routes/sakurazaka46/blog.ts @@ -20,7 +20,7 @@ export const route: Route = { supportScihub: false, }, name: 'Sakurazaka46 Blog 櫻坂 46 博客', - maintainers: ['victor21813', 'nczitzk', 'akashigakki'], + maintainers: ['victor21813', 'nczitzk', 'AkashiGakki'], handler, description: `Member ID diff --git a/lib/routes/sec-in/index.ts b/lib/routes/sec-in/index.ts index fc0d3078b..1343da426 100644 --- a/lib/routes/sec-in/index.ts +++ b/lib/routes/sec-in/index.ts @@ -4,7 +4,9 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/', - name: 'Unknown', + categories: ['bbs'], + example: '/sec-in', + name: '最新文章', maintainers: ['p7e4'], handler, }; diff --git a/lib/routes/secretsanfrancisco/rss.tsx b/lib/routes/secretsanfrancisco/rss.tsx index 20d069784..e4e1510a3 100644 --- a/lib/routes/secretsanfrancisco/rss.tsx +++ b/lib/routes/secretsanfrancisco/rss.tsx @@ -27,7 +27,7 @@ export const route: Route = { }, ], name: 'Category', - maintainers: ['EthanWng97'], + maintainers: ['IvanWng97'], handler, }; diff --git a/lib/routes/sehuatang/index.ts b/lib/routes/sehuatang/index.ts index fe0e975c5..1d2f8c095 100644 --- a/lib/routes/sehuatang/index.ts +++ b/lib/routes/sehuatang/index.ts @@ -41,6 +41,12 @@ const forumIdMaps = { export const route: Route = { path: ['/bt/:subforumid?', '/picture/:subforumid', '/:subforumid?/:type?', '/:subforumid?', ''], + categories: ['multimedia'], + example: '/sehuatang/36/368', + parameters: { + subforumid: '版块 id 或板块名称(见下表), 为空默认高清中文字幕', + type: '类型 id, 可在分区类型过滤后的 URL 中找到', + }, name: 'Forum', maintainers: ['qiwihui', 'junfengP', 'nczitzk'], handler, diff --git a/lib/routes/shu/jwb.ts b/lib/routes/shu/jwb.ts index ab5bd7601..3e29242bf 100644 --- a/lib/routes/shu/jwb.ts +++ b/lib/routes/shu/jwb.ts @@ -14,6 +14,9 @@ const alias = new Map([ export const route: Route = { path: '/jwb/:type?', + categories: ['university'], + example: '/shu/jwb/notice', + parameters: { type: '消息类型,默认为`notice`' }, radar: [ { source: ['www.shu.edu.cn/index'], diff --git a/lib/routes/shuiguopai/index.tsx b/lib/routes/shuiguopai/index.tsx index d881478a4..056097189 100644 --- a/lib/routes/shuiguopai/index.tsx +++ b/lib/routes/shuiguopai/index.tsx @@ -10,13 +10,15 @@ import timezone from '@/utils/timezone'; export const route: Route = { path: '/', + categories: ['new-media'], + example: '/shuiguopai', radar: [ { source: ['shuiguopai.com/'], target: '', }, ], - name: 'Unknown', + name: '首页', maintainers: ['nczitzk'], handler, url: 'shuiguopai.com/', diff --git a/lib/routes/sinchew/category.ts b/lib/routes/sinchew/category.ts new file mode 100644 index 000000000..4234f001d --- /dev/null +++ b/lib/routes/sinchew/category.ts @@ -0,0 +1,27 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/category/:category{.+}?', + categories: ['traditional-media'], + example: '/sinchew/category/头条', + parameters: { category: '分类,见下表,亦可以在对应分类页 URL 中找到' }, + radar: [ + { + source: ['sinchew.com.my/category/:category', 'sinchew.com.my/'], + target: '/category/:category', + }, + ], + name: '分类', + maintainers: ['nczitzk'], + description: `| 头条 | 国内 | 国际 | 言路 | 财经 | 地方 | 副刊 | 娱乐 | 体育 | 百格 | 星角攝 | 好运来 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | ------ | + +::: tip +若订阅单级分类 [头条](https://www.sinchew.com.my/category/头条),其 URL 为 [https://www.sinchew.com.my/category/ 头条](https://www.sinchew.com.my/category/头条),则路由为 [\`/sinchew/category/头条\`](https://rsshub.app/sinchew/category/头条)。 + +若订阅多级分类 [国际 > 天下事](https://www.sinchew.com.my/category/国际/天下事),其 URL 为 [https://www.sinchew.com.my/category/ 国际 / 天下事](https://www.sinchew.com.my/category/国际/天下事),则路由为 [\`/sinchew/category/国际/天下事\`](https://rsshub.app/sinchew/category/国际/天下事)。 +:::`, + handler, +}; diff --git a/lib/routes/sinchew/index.tsx b/lib/routes/sinchew/index.tsx index e34462f1b..c0996abf7 100644 --- a/lib/routes/sinchew/index.tsx +++ b/lib/routes/sinchew/index.tsx @@ -9,22 +9,26 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; export const route: Route = { - path: '*', + path: '/', + categories: ['traditional-media'], + example: '/sinchew', radar: [ { source: ['sinchew.com.my/'], - target: '', + target: '/', }, ], - name: 'Unknown', - maintainers: [], + name: '首页', + maintainers: ['nczitzk'], handler, url: 'sinchew.com.my/', }; -async function handler(ctx) { +export async function handler(ctx) { + const subPath = getSubPath(ctx); + const rootUrl = 'https://www.sinchew.com.my'; - const currentUrl = `${rootUrl}${getSubPath(ctx) === '/' ? '' : getSubPath(ctx)}`; + const currentUrl = `${rootUrl}${subPath === '/' ? '' : subPath}`; const response = await got({ method: 'get', diff --git a/lib/routes/sinchew/latest.ts b/lib/routes/sinchew/latest.ts new file mode 100644 index 000000000..479c6172c --- /dev/null +++ b/lib/routes/sinchew/latest.ts @@ -0,0 +1,18 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/latest', + categories: ['traditional-media'], + example: '/sinchew/latest', + radar: [ + { + source: ['sinchew.com.my/latest', 'sinchew.com.my/'], + target: '/latest', + }, + ], + name: '最新', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/snowpeak/us-new-arrivals.tsx b/lib/routes/snowpeak/us-new-arrivals.tsx index 93f700df5..7d87abd2d 100644 --- a/lib/routes/snowpeak/us-new-arrivals.tsx +++ b/lib/routes/snowpeak/us-new-arrivals.tsx @@ -24,7 +24,7 @@ export const route: Route = { }, ], name: 'New Arrivals(USA)', - maintainers: ['EthanWng97'], + maintainers: ['IvanWng97'], handler, url: 'snowpeak.com/collections/new-arrivals', }; diff --git a/lib/routes/sony/downloads.ts b/lib/routes/sony/downloads.ts index f8cd5f114..222cdf2a3 100644 --- a/lib/routes/sony/downloads.ts +++ b/lib/routes/sony/downloads.ts @@ -23,7 +23,7 @@ export const route: Route = { }, ], name: 'Software Downloads', - maintainers: ['EthanWng97'], + maintainers: ['IvanWng97'], handler, description: `::: tip Open \`https://www.sony.com/electronics/support\` and search for the corresponding product, such as \`Sony A7M4\`, the website corresponding to which is \`https://www.sony.com/electronics/support/e-mount-body-ilce-7-series/ilce-7m4/downloads\`, where \`productType\` is \`e-mount-body-ilce-7-series\` and \`productId\` is \`ilce-7m4\`. diff --git a/lib/routes/sspu/jwc.ts b/lib/routes/sspu/jwc.ts index b6a61a19a..a9101dbe1 100644 --- a/lib/routes/sspu/jwc.ts +++ b/lib/routes/sspu/jwc.ts @@ -8,14 +8,20 @@ import timezone from '@/utils/timezone'; export const route: Route = { path: '/jwc/:listId', + categories: ['university'], + example: '/sspu/jwc/897', + parameters: { listId: '专栏 ID,见下表' }, radar: [ { source: ['jwc.sspu.edu.cn/jwc/:listId/list.htm'], }, ], - name: 'Unknown', + name: '教务处', maintainers: ['TonyRL'], handler, + description: `| 学生专栏 | 教师专栏 | +| -------- | -------- | +| 897 | 898 |`, }; async function handler(ctx) { diff --git a/lib/routes/sspu/pe.ts b/lib/routes/sspu/pe.ts index 317e5ec67..267abd63d 100644 --- a/lib/routes/sspu/pe.ts +++ b/lib/routes/sspu/pe.ts @@ -7,15 +7,62 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/pe/:id?', + categories: ['university'], + example: '/sspu/pe', + parameters: { id: '栏目 id,见下表,默认为通知公告' }, radar: [ { source: ['pe2016.sspu.edu.cn/:id/list.htm'], target: '/pe/:id', }, ], - name: 'Unknown', + name: '体育部', maintainers: ['nczitzk'], handler, + description: `| 通知公告 | 体育新闻 | 场馆管理 | 相关下载 | +| -------- | -------- | -------- | -------- | +| 342 | 343 | 324 | 325 | + +
+ 更多栏目 + +#### [部门概况](https://pe2016.sspu.edu.cn/318/list.htm) + +| [部门简介](https://pe2016.sspu.edu.cn/327/list.htm) | [师资介绍](https://pe2016.sspu.edu.cn/328/list.htm) | [机构设置](https://pe2016.sspu.edu.cn/329/list.htm) | [团队建设](https://pe2016.sspu.edu.cn/330/list.htm) | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| 327 | 328 | 329 | 330 | + +#### [教育教学](https://pe2016.sspu.edu.cn/319/list.htm) + +| [课程介绍](https://pe2016.sspu.edu.cn/331/list.htm) | [教学管理](https://pe2016.sspu.edu.cn/332/list.htm) | [教学成果](https://pe2016.sspu.edu.cn/333/list.htm) | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| 331 | 332 | 333 | + +#### [学科研究](https://pe2016.sspu.edu.cn/320/list.htm) + +| [学术交流](https://pe2016.sspu.edu.cn/334/list.htm) | [科研工作](https://pe2016.sspu.edu.cn/335/list.htm) | +| --------------------------------------------------- | --------------------------------------------------- | +| 334 | 335 | + +#### [运动竞赛](https://pe2016.sspu.edu.cn/321/list.htm) + +| [竞赛管理](https://pe2016.sspu.edu.cn/336/list.htm) | [竞赛成绩](https://pe2016.sspu.edu.cn/337/list.htm) | [特色项目](https://pe2016.sspu.edu.cn/338/list.htm) | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| 336 | 337 | 338 | + +#### [群体活动](https://pe2016.sspu.edu.cn/322/list.htm) + +| [阳光体育](https://pe2016.sspu.edu.cn/345/list.htm) | [体育社团](https://pe2016.sspu.edu.cn/346/list.htm) | +| --------------------------------------------------- | --------------------------------------------------- | +| 345 | 346 | + +#### [党群工作](https://pe2016.sspu.edu.cn/323/list.htm) + +| [党务公开](https://pe2016.sspu.edu.cn/339/list.htm) | [精神文明](https://pe2016.sspu.edu.cn/340/list.htm) | [教工之家](https://pe2016.sspu.edu.cn/341/list.htm) | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| 339 | 340 | 341 | + +
`, }; async function handler(ctx) { diff --git a/lib/routes/stratechery/index.ts b/lib/routes/stratechery/index.ts index 613192c95..21cdfba08 100644 --- a/lib/routes/stratechery/index.ts +++ b/lib/routes/stratechery/index.ts @@ -3,7 +3,9 @@ import buildData from '@/utils/common-config'; export const route: Route = { path: '/', - name: 'Unknown', + categories: ['blog'], + example: '/stratechery', + name: 'Blog', maintainers: ['chazeon'], handler, }; diff --git a/lib/routes/subhd/index.ts b/lib/routes/subhd/index.ts index b836ff717..a6706d2d0 100644 --- a/lib/routes/subhd/index.ts +++ b/lib/routes/subhd/index.ts @@ -2,37 +2,41 @@ import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; +import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; -const config = { - sub: { - title: '字幕', - category: 'new', - }, - zu: { - title: '字幕组', - category: '14', - }, - newest: { - category: 'for backwards compatibility', - }, +const defaultCategories = { + sub: 'new', + zu: '14', }; export const route: Route = { - path: '/:type?/:category?', - name: 'Unknown', - maintainers: [], + path: '/sub/:category?', + categories: ['multimedia'], + example: '/subhd/sub/new', + parameters: { category: '分类,见下表,默认为最新' }, + radar: [ + { + source: ['subhd.tv/sub/:category', 'subhd.tv/'], + target: '/sub/:category?', + }, + ], + name: '字幕', + description: `| 最新字幕 | 热门字幕 | 剧集字幕 | 电影字幕 | +| -------- | -------- | -------- | -------- | +| new | top | tv | movie |`, + maintainers: ['laampui', 'nczitzk'], handler, }; -async function handler(ctx) { - const type = ctx.req.param('type') ?? 'sub'; - const category = ctx.req.param('category') ?? config[type].category; +export async function handler(ctx) { + const type = getSubPath(ctx).split('/', 2)[1]; + const category = ctx.req.param('category') ?? defaultCategories[type]; const rootUrl = 'https://subhd.tv'; - const currentUrl = `${rootUrl}/${type === 'newest' ? 'sub/new' : `${type}/${category}${type === 'zu' ? '/l' : ''}`}`; + const currentUrl = `${rootUrl}/${type}/${category}${type === 'zu' ? '/l' : ''}`; const response = await got({ method: 'get', diff --git a/lib/routes/subhd/zu.ts b/lib/routes/subhd/zu.ts new file mode 100644 index 000000000..84a9397ca --- /dev/null +++ b/lib/routes/subhd/zu.ts @@ -0,0 +1,22 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/zu/:category?', + categories: ['multimedia'], + example: '/subhd/zu/14', + parameters: { category: '字幕组,见下表,默认为 YYeTs字幕组' }, + radar: [ + { + source: ['subhd.tv/zu/:category', 'subhd.tv/'], + target: '/zu/:category?', + }, + ], + name: '字幕组', + description: `| YYeTs 字幕组 | F.I.X 字幕侠 | 深影字幕组 | 擦枪字幕组 | 哒哒字幕组 | 迪幻字幕组 | 伊甸园字幕组 | H-SGDK 字幕组 | 蓝血字幕组 | GA 字幕组 | CC 标准电影字幕组 | NEW 字幕组 | Orange 字幕组 | 圣城家园 SCG 字幕组 | 纪录片之家字幕组 | +| ------------ | ------------ | ---------- | ---------- | ---------- | ---------- | ------------ | ------------- | ---------- | --------- | ----------------- | ---------- | ------------- | ------------------- | ---------------- | +| 14 | 28 | 2 | 118 | 132 | 20 | 1 | 18 | 71 | 11 | 75 | 130 | 66 | 19 | 10 |`, + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/supchina/index.ts b/lib/routes/supchina/index.ts index 984ac98d5..2bcc155f0 100644 --- a/lib/routes/supchina/index.ts +++ b/lib/routes/supchina/index.ts @@ -7,13 +7,15 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/', + categories: ['new-media'], + example: '/supchina', radar: [ { source: ['supchina.com/feed', 'supchina.com/'], target: '', }, ], - name: 'Unknown', + name: 'Feed', maintainers: ['nczitzk'], handler, url: 'supchina.com/feed', diff --git a/lib/routes/sysu/cse.ts b/lib/routes/sysu/cse.ts index 39ca483db..f2fb55f4f 100644 --- a/lib/routes/sysu/cse.ts +++ b/lib/routes/sysu/cse.ts @@ -22,7 +22,7 @@ export const route: Route = { }, ], name: '数据科学与计算机学院动态', - maintainers: [], + maintainers: ['MegrezZhu', 'Neutrino3316', 'nczitzk'], handler, url: 'cse.sysu.edu.cn/', }; diff --git a/lib/routes/tableau/viz-of-the-day.ts b/lib/routes/tableau/viz-of-the-day.ts index fc7976fb2..08d54c553 100644 --- a/lib/routes/tableau/viz-of-the-day.ts +++ b/lib/routes/tableau/viz-of-the-day.ts @@ -17,7 +17,7 @@ export const route: Route = { supportScihub: false, }, name: 'Viz of the day', - maintainers: [], + maintainers: ['KaiyoungYu'], handler, }; diff --git a/lib/routes/techcrunch/news.ts b/lib/routes/techcrunch/news.ts index ab5dad34a..0ee3006da 100644 --- a/lib/routes/techcrunch/news.ts +++ b/lib/routes/techcrunch/news.ts @@ -26,7 +26,7 @@ export const route: Route = { }, ], name: 'News', - maintainers: ['EthanWng97'], + maintainers: ['IvanWng97'], handler, url: 'techcrunch.com/', }; diff --git a/lib/routes/tencent/news/coronavirus/data.tsx b/lib/routes/tencent/news/coronavirus/data.tsx index 392a04c89..00b9b6558 100644 --- a/lib/routes/tencent/news/coronavirus/data.tsx +++ b/lib/routes/tencent/news/coronavirus/data.tsx @@ -8,7 +8,13 @@ import { getData } from './utils'; export const route: Route = { path: '/news/coronavirus/data/:province?/:city?', - name: 'Unknown', + categories: ['other'], + example: '/tencent/news/coronavirus/data/湖北/武汉', + parameters: { + province: '省/直辖市名,缺省则返回国内数据', + city: '城市名,缺省则返回全省数据。直辖市请使用区/县名。', + }, + name: '新型冠状病毒肺炎疫情实时追踪 - 省市疫情数据', maintainers: ['CaoMeiYouRen'], handler, }; diff --git a/lib/routes/tencent/news/coronavirus/total.tsx b/lib/routes/tencent/news/coronavirus/total.tsx index e516209a0..8d889c7af 100644 --- a/lib/routes/tencent/news/coronavirus/total.tsx +++ b/lib/routes/tencent/news/coronavirus/total.tsx @@ -7,12 +7,14 @@ import { getData } from './utils'; export const route: Route = { path: '/news/coronavirus/total', + categories: ['other'], + example: '/tencent/news/coronavirus/total', radar: [ { source: ['new.qq.com/zt2020/page/feiyan.htm'], }, ], - name: 'Unknown', + name: '新型冠状病毒肺炎疫情实时追踪 - 中国本土数据统计', maintainers: ['CaoMeiYouRen'], handler, url: 'new.qq.com/zt2020/page/feiyan.htm', diff --git a/lib/routes/theatlantic/news.ts b/lib/routes/theatlantic/news.ts index 0fb9ab832..8bdfb81d4 100644 --- a/lib/routes/theatlantic/news.ts +++ b/lib/routes/theatlantic/news.ts @@ -24,7 +24,7 @@ export const route: Route = { }, ], name: 'News', - maintainers: ['EthanWng97', 'pseudoyu'], + maintainers: ['IvanWng97', 'pseudoyu'], handler, description: `| Popular | Latest | Politics | Technology | Business | | ------------ | ------ | -------- | ---------- | -------- | diff --git a/lib/routes/thegadgetflow/rss.tsx b/lib/routes/thegadgetflow/rss.tsx index 36f80174c..f2dc55636 100644 --- a/lib/routes/thegadgetflow/rss.tsx +++ b/lib/routes/thegadgetflow/rss.tsx @@ -27,7 +27,7 @@ export const route: Route = { }, ], name: 'Category', - maintainers: ['EthanWng97'], + maintainers: ['IvanWng97'], handler, }; diff --git a/lib/routes/thenewslens/author.ts b/lib/routes/thenewslens/author.ts new file mode 100644 index 000000000..b501d6b89 --- /dev/null +++ b/lib/routes/thenewslens/author.ts @@ -0,0 +1,19 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/author/:id/:sort{.+}?', + categories: ['new-media'], + example: '/thenewslens/author/BBC', + parameters: { id: '作者 id,可在对应作者页 URL 中找到', sort: '排序方式,同上表,可在对应排序页 URL 中找到' }, + radar: [ + { + source: ['thenewslens.com/author/:id/:sort?', 'thenewslens.com/'], + target: '/author/:id/:sort?', + }, + ], + name: '作者', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/thenewslens/category.ts b/lib/routes/thenewslens/category.ts new file mode 100644 index 000000000..5437138ae --- /dev/null +++ b/lib/routes/thenewslens/category.ts @@ -0,0 +1,19 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/category/:id/:sort{.+}?', + categories: ['new-media'], + example: '/thenewslens/category/politics', + parameters: { id: '分类 id,可在对应分类页 URL 中找到', sort: '排序方式,同上表,可在对应排序页 URL 中找到' }, + radar: [ + { + source: ['thenewslens.com/category/:id/:sort?', 'thenewslens.com/'], + target: '/category/:id/:sort?', + }, + ], + name: '分类', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/thenewslens/channel.ts b/lib/routes/thenewslens/channel.ts new file mode 100644 index 000000000..40736e896 --- /dev/null +++ b/lib/routes/thenewslens/channel.ts @@ -0,0 +1,19 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/channel/:id/:sort{.+}?', + categories: ['new-media'], + example: '/thenewslens/channel/hk', + parameters: { id: '标签 id,可在对应标签页 URL 中找到', sort: '排序方式,同上表,可在对应排序页 URL 中找到' }, + radar: [ + { + source: ['thenewslens.com/channel/:id/:sort?', 'thenewslens.com/'], + target: '/channel/:id/:sort?', + }, + ], + name: '频道', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/thenewslens/index.ts b/lib/routes/thenewslens/index.ts index 7d37877a0..ce307439f 100644 --- a/lib/routes/thenewslens/index.ts +++ b/lib/routes/thenewslens/index.ts @@ -9,13 +9,25 @@ import { parseDate } from '@/utils/parse-date'; import { renderDescription } from './templates/description'; export const route: Route = { - path: '*', - name: 'Unknown', - maintainers: [], + path: '/latest-article/:sort{.+}?', + categories: ['new-media'], + example: '/thenewslens/latest-article', + parameters: { sort: '排序方式,见下表,可在对应排序页 URL 中找到' }, + description: `| 最新文章 | 最多觀看 | 最多分享 | 本日 | 本週 | 本月 | 今年 | 去年 | 有史以來 | +| -------- | -------- | -------- | --------- | -------- | --------- | -------- | ------------ | ----------- | +| | hot | social | hot/today | hot/week | hot/month | hot/year | hot/lastYear | hot/history |`, + radar: [ + { + source: ['thenewslens.com/latest-article/:sort?', 'thenewslens.com/'], + target: '/latest-article/:sort?', + }, + ], + name: '最新', + maintainers: ['nczitzk'], handler, }; -async function handler(ctx) { +export async function handler(ctx) { const rootUrl = 'https://www.thenewslens.com'; const currentUrl = `${rootUrl}${getSubPath(ctx) === '/' ? '/latest-article' : getSubPath(ctx)}`; diff --git a/lib/routes/thenewslens/news.ts b/lib/routes/thenewslens/news.ts new file mode 100644 index 000000000..a73df3f4e --- /dev/null +++ b/lib/routes/thenewslens/news.ts @@ -0,0 +1,22 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/news/:sort{.+}?', + categories: ['new-media'], + example: '/thenewslens/news', + parameters: { sort: '排序方式,见下表,可在对应排序页 URL 中找到' }, + description: `| 最新文章 | 最多觀看 | 最多分享 | +| -------- | -------- | -------- | +| | hot | social |`, + radar: [ + { + source: ['thenewslens.com/news/:sort?', 'thenewslens.com/'], + target: '/news/:sort?', + }, + ], + name: '新闻', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/thenewslens/review.ts b/lib/routes/thenewslens/review.ts new file mode 100644 index 000000000..39d285093 --- /dev/null +++ b/lib/routes/thenewslens/review.ts @@ -0,0 +1,19 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/review/:sort{.+}?', + categories: ['new-media'], + example: '/thenewslens/review', + parameters: { sort: '排序方式,同上表,可在对应排序页 URL 中找到' }, + radar: [ + { + source: ['thenewslens.com/review/:sort?', 'thenewslens.com/'], + target: '/review/:sort?', + }, + ], + name: '评论', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/thenewslens/tag.ts b/lib/routes/thenewslens/tag.ts new file mode 100644 index 000000000..ffd23e4db --- /dev/null +++ b/lib/routes/thenewslens/tag.ts @@ -0,0 +1,19 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/tag/:id/:sort{.+}?', + categories: ['new-media'], + example: '/thenewslens/tag/中國', + parameters: { id: '标签 id,可在对应标签页 URL 中找到', sort: '排序方式,同上表,可在对应排序页 URL 中找到' }, + radar: [ + { + source: ['thenewslens.com/tag/:id/:sort?', 'thenewslens.com/'], + target: '/tag/:id/:sort?', + }, + ], + name: '标签', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/thenewslens/videos.ts b/lib/routes/thenewslens/videos.ts new file mode 100644 index 000000000..ad2809218 --- /dev/null +++ b/lib/routes/thenewslens/videos.ts @@ -0,0 +1,19 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/videos/Projects/:sort{.+}?', + categories: ['new-media'], + example: '/thenewslens/videos/Projects', + parameters: { sort: '排序方式,同上表,可在对应排序页 URL 中找到' }, + radar: [ + { + source: ['thenewslens.com/videos/Projects/:sort?'], + target: '/videos/Projects/:sort?', + }, + ], + name: '影音', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/thepaper/839studio/category.ts b/lib/routes/thepaper/839studio/category.ts index f58ec4409..7791bfe9f 100644 --- a/lib/routes/thepaper/839studio/category.ts +++ b/lib/routes/thepaper/839studio/category.ts @@ -5,6 +5,12 @@ import got from '@/utils/got'; export const route: Route = { path: '/839studio/:id', + categories: ['traditional-media'], + example: '/thepaper/839studio/2', + parameters: { id: '分类 id,默认订阅全部分类' }, + description: `| 视频 | 交互 | 信息图 | 数据故事 | +| ---- | ---- | ------ | -------- | +| 2 | 4 | 3 | 453 |`, radar: [ { source: ['thepaper.cn/'], diff --git a/lib/routes/thepaper/839studio/studio.ts b/lib/routes/thepaper/839studio/studio.ts index 76500f978..d97e5abe0 100644 --- a/lib/routes/thepaper/839studio/studio.ts +++ b/lib/routes/thepaper/839studio/studio.ts @@ -5,6 +5,8 @@ import got from '@/utils/got'; export const route: Route = { path: '/839studio', + categories: ['traditional-media'], + example: '/thepaper/839studio', name: '澎湃美数课作品集', maintainers: ['umm233'], handler, diff --git a/lib/routes/tingshuitz/wuhan.ts b/lib/routes/tingshuitz/wuhan.ts index 415452b97..673fa2651 100644 --- a/lib/routes/tingshuitz/wuhan.ts +++ b/lib/routes/tingshuitz/wuhan.ts @@ -6,14 +6,21 @@ const baseUrl = 'https://www.whwater.com'; export const route: Route = { path: '/wuhan/:channelId?', + categories: ['forecast'], + example: '/tingshuitz/wuhan', + parameters: { channelId: '分类,见下表,默认为 68' }, + description: `| channelId | 分类 | +| --------- | ---------- | +| 68 | 计划性停水 | +| 69 | 突发性停水 |`, radar: [ { source: ['whwater.com/IWater.shtml', 'whwater.com/'], target: '/wuhan', }, ], - name: 'Unknown', - maintainers: [], + name: '武汉市', + maintainers: ['MoonBegonia'], handler, url: 'whwater.com/IWater.shtml', }; diff --git a/lib/routes/tokeninsight/bulletin.ts b/lib/routes/tokeninsight/bulletin.ts index fe39c6dcf..7b29c563c 100644 --- a/lib/routes/tokeninsight/bulletin.ts +++ b/lib/routes/tokeninsight/bulletin.ts @@ -35,7 +35,7 @@ export const route: Route = { }, ], name: 'Latest', - maintainers: [], + maintainers: ['fuergaosi233'], handler, }; diff --git a/lib/routes/tokeninsight/report.ts b/lib/routes/tokeninsight/report.ts index 7e26add65..7e927d133 100644 --- a/lib/routes/tokeninsight/report.ts +++ b/lib/routes/tokeninsight/report.ts @@ -29,7 +29,7 @@ export const route: Route = { }, ], name: 'Research', - maintainers: [], + maintainers: ['fuergaosi233'], handler, description: `Language: diff --git a/lib/routes/toodaylab/column.ts b/lib/routes/toodaylab/column.ts new file mode 100644 index 000000000..20edd922c --- /dev/null +++ b/lib/routes/toodaylab/column.ts @@ -0,0 +1,22 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/column/:id', + categories: ['new-media'], + example: '/toodaylab/column/299', + parameters: { id: '专栏 id,见下表,可在对应专栏页 URL 中找到' }, + radar: [ + { + source: ['toodaylab.com/column/:id'], + target: '/column/:id', + }, + ], + name: '专栏', + description: `| 专题 | 攻略 | +| ---- | ---- | +| 299 | 300 |`, + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/toodaylab/field.ts b/lib/routes/toodaylab/field.ts new file mode 100644 index 000000000..553b728bf --- /dev/null +++ b/lib/routes/toodaylab/field.ts @@ -0,0 +1,22 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/field/:id', + categories: ['new-media'], + example: '/toodaylab/field/308', + parameters: { id: '领域 id,见下表,可在对应领域页 URL 中找到' }, + radar: [ + { + source: ['toodaylab.com/field/:id'], + target: '/field/:id', + }, + ], + name: '领域', + description: `| 快消 | 时尚 | 智能 | 娱乐 | 运动 | 生活 | 设计 | 出行 | +| ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | +| 308 | 307 | 306 | 305 | 304 | 303 | 302 | 301 |`, + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/toodaylab/hot.ts b/lib/routes/toodaylab/hot.ts new file mode 100644 index 000000000..628c266cb --- /dev/null +++ b/lib/routes/toodaylab/hot.ts @@ -0,0 +1,18 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/hot', + categories: ['new-media'], + example: '/toodaylab/hot', + radar: [ + { + source: ['toodaylab.com/posts'], + target: '/hot', + }, + ], + name: '最热', + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/toodaylab/index.ts b/lib/routes/toodaylab/index.ts index 5c99f49c1..1960d9626 100644 --- a/lib/routes/toodaylab/index.ts +++ b/lib/routes/toodaylab/index.ts @@ -2,25 +2,34 @@ import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; +import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate, parseRelativeDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; export const route: Route = { - path: '/:params{.+}?', - name: 'Unknown', - maintainers: [], + path: '/posts', + categories: ['new-media'], + example: '/toodaylab/posts', + radar: [ + { + source: ['toodaylab.com/posts'], + target: '/posts', + }, + ], + name: '滚动', + maintainers: ['nczitzk'], handler, }; -async function handler(ctx) { - const { params = 'posts' } = ctx.req.param(); +export async function handler(ctx) { + const path = getSubPath(ctx); const limit = ctx.req.query('limit') ? Number(ctx.req.query('limit')) : 30; - const isHot = params === 'hot'; + const isHot = path === '/hot'; const rootUrl = 'https://www.toodaylab.com'; - const currentUrl = new URL(isHot ? 'posts' : params, rootUrl).href; + const currentUrl = new URL(isHot ? '/posts' : path, rootUrl).href; const { data: response } = await got(currentUrl); diff --git a/lib/routes/toodaylab/topic.ts b/lib/routes/toodaylab/topic.ts new file mode 100644 index 000000000..e804c2b05 --- /dev/null +++ b/lib/routes/toodaylab/topic.ts @@ -0,0 +1,25 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/topic/:id', + categories: ['new-media'], + example: '/toodaylab/topic/309', + parameters: { id: '话题 id,见下表,可在对应话题页 URL 中找到' }, + features: { + antiCrawler: true, + }, + radar: [ + { + source: ['toodaylab.com/topic/:id'], + target: '/topic/:id', + }, + ], + name: '话题', + description: `| 今日消费资讯 | 实验室带你过周末 | 实验室带你过假期 | 每日一图 | 每周一书 | 实验室数字 | 新鲜社会人 | 实验室 TV | +| ------------ | ---------------- | ---------------- | -------- | -------- | ---------- | ---------- | --------- | +| 309 | 37 | 40 | 32 | 33 | 310 | 316 | 476 |`, + maintainers: ['nczitzk'], + handler, +}; diff --git a/lib/routes/tradingview/blog.ts b/lib/routes/tradingview/blog.ts index fa8908c9d..5da34c01d 100644 --- a/lib/routes/tradingview/blog.ts +++ b/lib/routes/tradingview/blog.ts @@ -10,9 +10,57 @@ import { renderDescription } from './templates/description'; export const route: Route = { path: '/blog/:category{.+}?', - name: 'Unknown', - maintainers: [], + categories: ['program-update'], + example: '/tradingview/blog/en', + parameters: { + category: 'Language, see below, `en` as English by default', + }, + name: 'Blog', + maintainers: ['nczitzk'], handler, + description: `#### Language + +| Id | Language | +| -- | ------------------- | +| en | English | +| ru | Русский | +| ja | 日本語 | +| es | Español | +| tr | Türkçe | +| ko | 한국어 | +| it | Italiano | +| pt | Português do Brasil | +| de | Deutsch | +| fr | Français | +| pl | Polski | +| id | Bahasa Indonesia | +| my | Bahasa Malaysia | +| tw | 繁體 | +| cn | 简体 | +| vi | Tiếng Việt | +| th | ภาษาไทย | +| sv | Svenska | +| ar | العربية | +| il | Hebrew | + +#### Category + +| Category | ID | +| ---------------------------------------------------------------------------------------------- | ----------------------------- | +| [Alerts](https://www.tradingview.com/blog/en/category/alerts/) | category/alerts | +| [Bitcoin and Crypto](https://www.tradingview.com/blog/en/category/bitcoin-charts/) | category/bitcoin-charts | +| [Business Updates](https://www.tradingview.com/blog/en/category/business-updates/) | category/business-updates | +| [Charting](https://www.tradingview.com/blog/en/category/charts/) | category/charts | +| [Charting Library](https://www.tradingview.com/blog/en/category/charting-library/) | category/charting-library | +| [Data Feeds and Exchanges](https://www.tradingview.com/blog/en/category/data-feeds-exchanges/) | category/data-feeds-exchanges | +| [Desktop](https://www.tradingview.com/blog/en/category/desktop/) | category/desktop | +| [Market Analysis](https://www.tradingview.com/blog/en/category/market-analysis/) | category/market-analysis | +| [Mobile](https://www.tradingview.com/blog/en/category/mobile/) | category/mobile | +| [Pine Script®](https://www.tradingview.com/blog/en/category/pine/) | category/pine | +| [Screener](https://www.tradingview.com/blog/en/category/stock-screener/) | category/stock-screener | +| [Social](https://www.tradingview.com/blog/en/category/social/) | category/social | +| [Trading and Brokerage](https://www.tradingview.com/blog/en/category/trading/) | category/trading | +| [Widgets](https://www.tradingview.com/blog/en/category/widgets/) | category/widgets |`, }; async function handler(ctx) { diff --git a/lib/routes/tradingview/pine.ts b/lib/routes/tradingview/pine.ts index c95b76ac5..a4fbf3570 100644 --- a/lib/routes/tradingview/pine.ts +++ b/lib/routes/tradingview/pine.ts @@ -6,15 +6,22 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/pine/:version?', + categories: ['program-update'], + example: '/tradingview/pine', + parameters: { + version: 'Version, see below, `v5` by default', + }, radar: [ { source: ['tradingview.com/pine-script-docs/en/:version/Release_notes.html'], target: '/pine/:version', }, ], - name: 'Unknown', - maintainers: [], + name: 'Pine Script™ Release notes', + maintainers: ['nczitzk'], handler, + description: `| v5 | v4 | +| -- | -- |`, }; async function handler(ctx) { diff --git a/lib/routes/transcriptforest/index.ts b/lib/routes/transcriptforest/index.ts index 69db12e50..44c2632be 100644 --- a/lib/routes/transcriptforest/index.ts +++ b/lib/routes/transcriptforest/index.ts @@ -21,16 +21,76 @@ const bakeTimestamp = (seconds) => { export const route: Route = { path: '/:channel?', + categories: ['multimedia'], + example: '/transcriptforest/all-the-hacks', + parameters: { + channel: 'Channel, see below, all by default', + }, + features: { + supportPodcast: true, + }, radar: [ { source: ['www.transcriptforest.com/en/channel'], target: '', }, ], - name: 'Unknown', + name: 'Channel', maintainers: ['nczitzk'], handler, url: 'www.transcriptforest.com/en/channel', + description: `| Channel | ID | +| ---------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| [All](https://www.transcriptforest.com/en) | | +| [a16z podcast](https://www.transcriptforest.com/en/channel/a16z-podcast) | [a16z-podcast](https://rsshub.app/transcriptforest/a16z-podcast) | +| [Aarthi and Sriram's Good Time Show](https://www.transcriptforest.com/en/channel/aarthi-and-srirams-good-time-show) | [aarthi-and-srirams-good-time-show](https://rsshub.app/transcriptforest/aarthi-and-srirams-good-time-show) | +| [Acquired](https://www.transcriptforest.com/en/channel/acquired) | [acquired](https://rsshub.app/transcriptforest/acquired) | +| [All-In with Chamath, Jason, Sacks & Friedberg](https://www.transcriptforest.com/en/channel/all-in-with-chamath-jason-sacks-friedberg) | [all-in-with-chamath-jason-sacks-friedberg](https://rsshub.app/transcriptforest/all-in-with-chamath-jason-sacks-friedberg) | +| [All the Hacks](https://www.transcriptforest.com/en/channel/all-the-hacks) | [all-the-hacks](https://rsshub.app/transcriptforest/all-the-hacks) | +| [Breaking Points](https://www.transcriptforest.com/en/channel/breaking-points) | [breaking-points](https://rsshub.app/transcriptforest/breaking-points) | +| [Cartoon Avatars](https://www.transcriptforest.com/en/channel/cartoon-avatars) | [cartoon-avatars](https://rsshub.app/transcriptforest/cartoon-avatars) | +| [Conversations With Coleman](https://www.transcriptforest.com/en/channel/conversations-with-coleman) | [conversations-with-coleman](https://rsshub.app/transcriptforest/conversations-with-coleman) | +| [CSPI Podcast](https://www.transcriptforest.com/en/channel/cspi-podcast) | [cspi-podcast](https://rsshub.app/transcriptforest/cspi-podcast) | +| [Culpable](https://www.transcriptforest.com/en/channel/culpable) | [culpable](https://rsshub.app/transcriptforest/culpable) | +| [Dateline NBC](https://www.transcriptforest.com/en/channel/dateline-nbc) | [dateline-nbc](https://rsshub.app/transcriptforest/dateline-nbc) | +| [Execs](https://www.transcriptforest.com/en/channel/execs) | [execs](https://rsshub.app/transcriptforest/execs) | +| [Exponent](https://www.transcriptforest.com/en/channel/exponent) | [exponent](https://rsshub.app/transcriptforest/exponent) | +| [Freakonomics](https://www.transcriptforest.com/en/channel/freakonomics) | [freakonomics](https://rsshub.app/transcriptforest/freakonomics) | +| [Future of StoryTelling](https://www.transcriptforest.com/en/channel/future-of-storytelling) | [future-of-storytelling](https://rsshub.app/transcriptforest/future-of-storytelling) | +| [Gamecraft](https://www.transcriptforest.com/en/channel/gamecraft) | [gamecraft](https://rsshub.app/transcriptforest/gamecraft) | +| [Get WIRED](https://www.transcriptforest.com/en/channel/get-wired) | [get-wired](https://rsshub.app/transcriptforest/get-wired) | +| [Greymatter](https://www.transcriptforest.com/en/channel/greymatter) | [greymatter](https://rsshub.app/transcriptforest/greymatter) | +| [How I built this](https://www.transcriptforest.com/en/channel/how-I-built-this) | [how-I-built-this](https://rsshub.app/transcriptforest/how-I-built-this) | +| [Huberman Lab](https://www.transcriptforest.com/en/channel/huberman-lab) | [huberman-lab](https://rsshub.app/transcriptforest/huberman-lab) | +| [ICYMI](https://www.transcriptforest.com/en/channel/icymi) | [icymi](https://rsshub.app/transcriptforest/icymi) | +| [In Machines We Trust](https://www.transcriptforest.com/en/channel/in-machines-we-trust) | [in-machines-we-trust](https://rsshub.app/transcriptforest/in-machines-we-trust) | +| [Invest Like the Best with Patrick O'Shaughnessy](https://www.transcriptforest.com/en/channel/invest-like-the-best-with-patrick-o-shaughnessy) | [invest-like-the-best-with-patrick-o-shaughnessy](https://rsshub.app/transcriptforest/invest-like-the-best-with-patrick-o-shaughnessy) | +| [Joe Rogan Experience Review podcast](https://www.transcriptforest.com/en/channel/joe-rogan-experience-review-podcast) | [joe-rogan-experience-review-podcast](https://rsshub.app/transcriptforest/joe-rogan-experience-review-podcast) | +| [Land of Giants](https://www.transcriptforest.com/en/channel/land-of-giants) | [land-of-giants](https://rsshub.app/transcriptforest/land-of-giants) | +| [Lenny's Podcast: Product \\| Growth \\| Career](https://www.transcriptforest.com/en/channel/lenny-podcast-product-growth-career) | [lenny-podcast-product-growth-career](https://rsshub.app/transcriptforest/lenny-podcast-product-growth-career) | +| [Lex Fridman Podcast](https://www.transcriptforest.com/en/channel/lex-fridman-podcast) | [lex-fridman-podcast](https://rsshub.app/transcriptforest/lex-fridman-podcast) | +| [Making Sense with Sam Harris](https://www.transcriptforest.com/en/channel/making-sense-with-sam-harris) | [making-sense-with-sam-harris](https://rsshub.app/transcriptforest/making-sense-with-sam-harris) | +| [Masters of Scale](https://www.transcriptforest.com/en/channel/masters-of-scale) | [masters-of-scale](https://rsshub.app/transcriptforest/masters-of-scale) | +| [Modern Wisdom](https://www.transcriptforest.com/en/channel/modern-wisdom) | [modern-wisdom](https://rsshub.app/transcriptforest/modern-wisdom) | +| [Moment of Zen](https://www.transcriptforest.com/en/channel/moment-of-zen) | [moment-of-zen](https://rsshub.app/transcriptforest/moment-of-zen) | +| [Morbid](https://www.transcriptforest.com/en/channel/morbid) | [morbid](https://rsshub.app/transcriptforest/morbid) | +| [My First Million](https://www.transcriptforest.com/en/channel/my-first-million) | [my-first-million](https://rsshub.app/transcriptforest/my-first-million) | +| [Naval](https://www.transcriptforest.com/en/channel/naval) | [naval](https://rsshub.app/transcriptforest/naval) | +| [Newcomer Podcast](https://www.transcriptforest.com/en/channel/newcomer-podcast) | [newcomer-podcast](https://rsshub.app/transcriptforest/newcomer-podcast) | +| [Not investment advice](https://www.transcriptforest.com/en/channel/not-investment-advice) | [not-investment-advice](https://rsshub.app/transcriptforest/not-investment-advice) | +| [Odd Lots](https://www.transcriptforest.com/en/channel/odd-lots) | [odd-lots](https://rsshub.app/transcriptforest/odd-lots) | +| [On with Kara Swisher](https://www.transcriptforest.com/en/channel/on-with-kara-swisher) | [on-with-kara-swisher](https://rsshub.app/transcriptforest/on-with-kara-swisher) | +| [Proof: A True Crime Podcast](https://www.transcriptforest.com/en/channel/proof-a-true-crime-podcast) | [proof-a-true-crime-podcast](https://rsshub.app/transcriptforest/proof-a-true-crime-podcast) | +| [Reply All](https://www.transcriptforest.com/en/channel/reply-all) | [reply-all](https://rsshub.app/transcriptforest/reply-all) | +| [Revisionist History](https://www.transcriptforest.com/en/channel/revisionist-history) | [revisionist-history](https://rsshub.app/transcriptforest/revisionist-history) | +| [Serial](https://www.transcriptforest.com/en/channel/serial-podcast) | [serial-podcast](https://rsshub.app/transcriptforest/serial-podcast) | +| [Slow Burn](https://www.transcriptforest.com/en/channel/slow-burn) | [slow-burn](https://rsshub.app/transcriptforest/slow-burn) | +| [StrictlyVC Download](https://www.transcriptforest.com/en/channel/strictlyvc-download) | [strictlyvc-download](https://rsshub.app/transcriptforest/strictlyvc-download) | +| [Stuff You Should Know:](https://www.transcriptforest.com/en/channel/stuff-you-should-know) | [stuff-you-should-know](https://rsshub.app/transcriptforest/stuff-you-should-know) | +| [Subversive w/Alex Kaschuta](https://www.transcriptforest.com/en/channel/subversive-w-alex-kaschuta) | [subversive-w-alex-kaschuta](https://rsshub.app/transcriptforest/subversive-w-alex-kaschuta) | +| [TED Radio Hour](https://www.transcriptforest.com/en/channel/ted-radio-hour) | [ted-radio-hour](https://rsshub.app/transcriptforest/ted-radio-hour) | +| [The Bootstrapped Founder](https://www.transcriptforest.com/en/channel/the-bootstrapped-founder) | [the-bootstrapped-founder](https://rsshub.app/transcriptforest/the-bootstrapped-founder) | +| [The Boyscast with Ryan Long](https://www.transcriptforest.com/en/channel/the-boyscast-with-ryan-long) | [the-boyscast-with-ryan-long](https://rsshub.app/transcriptforest/the-boyscast-with-ryan-long) |`, }; async function handler(ctx) { diff --git a/lib/routes/tribalfootball/latest.tsx b/lib/routes/tribalfootball/latest.tsx index 6a20aff52..f740a83d3 100644 --- a/lib/routes/tribalfootball/latest.tsx +++ b/lib/routes/tribalfootball/latest.tsx @@ -23,13 +23,15 @@ const renderDescription = (desc, headerImage) => export const route: Route = { path: '/', + categories: ['new-media'], + example: '/tribalfootball', radar: [ { source: ['tribalfootball.com/'], target: '', }, ], - name: 'Unknown', + name: 'Latest News', maintainers: ['Rongronggg9'], handler, url: 'tribalfootball.com/', diff --git a/lib/routes/tynu/tynu.ts b/lib/routes/tynu/tynu.ts index 99373ee6b..735beb8a8 100644 --- a/lib/routes/tynu/tynu.ts +++ b/lib/routes/tynu/tynu.ts @@ -9,13 +9,15 @@ const baseUrl = 'http://www.tynu.edu.cn'; export const route: Route = { path: '/', + categories: ['university'], + example: '/tynu', radar: [ { source: ['tynu.edu.cn/index/tzgg.htm', 'tynu.edu.cn/index.htm', 'tynu.edu.cn/'], target: '', }, ], - name: 'Unknown', + name: '通知公告', maintainers: ['2PoL'], handler, url: 'tynu.edu.cn/index/tzgg.htm', diff --git a/lib/routes/ulapia/research.ts b/lib/routes/ulapia/research.ts index c79a115a7..896ac3a7c 100644 --- a/lib/routes/ulapia/research.ts +++ b/lib/routes/ulapia/research.ts @@ -28,7 +28,7 @@ export const route: Route = { }, ], name: '最新研报', - maintainers: [], + maintainers: ['Fatpandac'], handler, url: 'www.ulapia.com/', }; diff --git a/lib/routes/uraaka-joshi/uraaka-joshi.ts b/lib/routes/uraaka-joshi/uraaka-joshi.ts index 98ed55ae7..a4794d72b 100644 --- a/lib/routes/uraaka-joshi/uraaka-joshi.ts +++ b/lib/routes/uraaka-joshi/uraaka-joshi.ts @@ -6,13 +6,15 @@ import playwright from '@/utils/playwright'; export const route: Route = { path: '/', + categories: ['other'], + example: '/uraaka-joshi', radar: [ { source: ['uraaka-joshi.com/'], target: '', }, ], - name: 'Unknown', + name: 'Homepage', maintainers: ['SettingDust', 'Halcao'], handler, url: 'uraaka-joshi.com/', diff --git a/lib/routes/usts/jwch.ts b/lib/routes/usts/jwch.ts index 62bccf666..4ba1f0b2a 100644 --- a/lib/routes/usts/jwch.ts +++ b/lib/routes/usts/jwch.ts @@ -22,7 +22,7 @@ export const route: Route = { supportScihub: false, }, name: '教务处', - maintainers: [], + maintainers: ['Fatpandac'], handler, description: `| 类型 | 教务动态 | 公告在线 | 选课通知 | | ---- | -------- | -------- | -------- | diff --git a/lib/routes/v1tx/index.ts b/lib/routes/v1tx/index.ts index 4da2bb2f6..8acb0872e 100644 --- a/lib/routes/v1tx/index.ts +++ b/lib/routes/v1tx/index.ts @@ -7,13 +7,15 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/', + categories: ['blog'], + example: '/v1tx', radar: [ { source: ['v1tx.com/'], target: '', }, ], - name: 'Unknown', + name: '最新文章', maintainers: ['TonyRL'], handler, url: 'v1tx.com/', diff --git a/lib/routes/v2rayshare/index.ts b/lib/routes/v2rayshare/index.ts index 5a8f753ff..833932d00 100644 --- a/lib/routes/v2rayshare/index.ts +++ b/lib/routes/v2rayshare/index.ts @@ -4,13 +4,16 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/', + categories: ['other'], + example: '/v2rayshare', radar: [ { source: ['v2rayshare.com/'], target: '', }, ], - name: 'Unknown', + name: '免费节点', + description: '获取来自 V2rayShare 的免费节点,可以通过链接复制或下载', maintainers: ['77taibai'], handler, url: 'v2rayshare.com/', diff --git a/lib/routes/vcb-s/index.ts b/lib/routes/vcb-s/index.ts index 1895f826d..634c07658 100644 --- a/lib/routes/vcb-s/index.ts +++ b/lib/routes/vcb-s/index.ts @@ -9,13 +9,15 @@ const postsAPIUrl = `${rootUrl}/wp-json/wp/v2/posts`; export const route: Route = { path: '/', + categories: ['anime'], + example: '/vcb-s', radar: [ { source: ['vcb-s.com/'], target: '', }, ], - name: 'Unknown', + name: '最新文章', maintainers: ['cxfksword'], handler, url: 'vcb-s.com/', diff --git a/lib/routes/wallpaperhub/index.tsx b/lib/routes/wallpaperhub/index.tsx index 7093c47fe..680f6ce14 100644 --- a/lib/routes/wallpaperhub/index.tsx +++ b/lib/routes/wallpaperhub/index.tsx @@ -6,13 +6,15 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/', + categories: ['picture'], + example: '/wallpaperhub', radar: [ { source: ['wallpaperhub.app/wallpaperhub', 'wallpaperhub.app/'], target: '', }, ], - name: 'Unknown', + name: 'Wallpapers', maintainers: ['nczitzk'], handler, url: 'wallpaperhub.app/wallpaperhub', diff --git a/lib/routes/wdc/download.ts b/lib/routes/wdc/download.ts index f2c66f82e..08147a7bf 100644 --- a/lib/routes/wdc/download.ts +++ b/lib/routes/wdc/download.ts @@ -18,7 +18,7 @@ export const route: Route = { supportScihub: false, }, name: 'Download', - maintainers: [], + maintainers: ['nczitzk'], handler, }; diff --git a/lib/routes/web3caff/index.ts b/lib/routes/web3caff/index.ts index 90f8e9422..2fa1d57be 100644 --- a/lib/routes/web3caff/index.ts +++ b/lib/routes/web3caff/index.ts @@ -2,22 +2,27 @@ import { load } from 'cheerio'; import type { Route } from '@/types'; import cache from '@/utils/cache'; -import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { - path: '*', - name: 'Unknown', - maintainers: [], + path: '/:path{.+}?', + categories: ['new-media'], + example: '/web3caff/zh/archives/category/news_zh', + parameters: { path: '路径,默认为首页' }, + name: '发现', + maintainers: ['nczitzk'], + description: `路径处填写对应页面 URL 中 \`https://web3caff.com/\` 后的字段。下面是一个例子。 + +若订阅 [叙事 - Web3Caff](https://web3caff.com/zh/archives/category/news_zh) 则将对应页面 URL 中 \`https://web3caff.com/\` 后的字段 \`zh/archives/category/news_zh\` 作为路径填入。此时路由为 [\`/web3caff/zh/archives/category/news_zh\`](https://rsshub.app/web3caff/zh/archives/category/news_zh)`, handler, }; async function handler(ctx) { - const params = getSubPath(ctx) === '/' ? '' : getSubPath(ctx); + const path = ctx.req.param('path'); const rootUrl = 'https://web3caff.com'; - const currentUrl = `${rootUrl}${params}`; + const currentUrl = path ? `${rootUrl}/${path}` : rootUrl; const response = await got({ method: 'get', diff --git a/lib/routes/wechat/data258.ts b/lib/routes/wechat/data258.ts index 4e1344b90..c544cb205 100644 --- a/lib/routes/wechat/data258.ts +++ b/lib/routes/wechat/data258.ts @@ -23,15 +23,31 @@ const parsePage = ($item, hyperlinkSelector, timeSelector) => { export const route: Route = { path: '/data258/:id?', + categories: ['new-media'], + example: '/wechat/data258/gh_cbbad4c1d33c', + parameters: { id: '公众号 id 或分类 id,可在公众号页或分类页 URL 中找到;若略去,则抓取首页' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, radar: [ { source: ['mp.data258.com/', 'mp.data258.com/article/category/:id'], }, ], - name: 'Unknown', + name: '公众号(微阅读来源)', maintainers: ['Rongronggg9'], handler, url: 'mp.data258.com/', + description: `::: warning +由于使用了一些针对反爬的缓解措施,本路由响应较慢。默认只抓取前 5 条,可通过 \`?limit=\` 改变(不推荐,容易被反爬)。 + +该网站使用 IP 甄别访客,且应用严格的每日阅读量限额(约 15 次),请自建并确保正确配置缓存;如使用内存缓存而非 Redis 缓存,请增大缓存容量。该限额足够订阅至少 3 个公众号(假设公众号每日仅更新一次);首页 / 分类页更新相当频繁,不推荐订阅。 +:::`, }; async function handler(ctx) { @@ -81,7 +97,7 @@ async function handler(ctx) { let err; // !!! let RSSHub throw an anti-crawler prompt if the route is empty !!! - /* eslint-disable no-await-in-loop */ + /* oxlint-disable no-await-in-loop */ for (const item of items) { // https://mp.data258.com/wx?id=${id}&t={token}, id is a permanent hex, token is a temporary base64 const cacheId = item.link.match(/id=([\da-f]+)/)[1]; diff --git a/lib/routes/wechat/sogou.ts b/lib/routes/wechat/sogou.ts index ea01b3ffb..b4e197b5b 100644 --- a/lib/routes/wechat/sogou.ts +++ b/lib/routes/wechat/sogou.ts @@ -149,7 +149,7 @@ export const route: Route = { supportScihub: false, }, name: '公众号(搜狗来源)', - maintainers: ['EthanWng97', 'pseudoyu'], + maintainers: ['IvanWng97', 'pseudoyu'], handler, }; diff --git a/lib/routes/wenku8/index.ts b/lib/routes/wenku8/index.ts index 73109a6f1..96a9af646 100644 --- a/lib/routes/wenku8/index.ts +++ b/lib/routes/wenku8/index.ts @@ -25,8 +25,22 @@ const cateTitleMap = { export const route: Route = { path: '/:category?', - name: 'Unknown', + categories: ['reading'], + example: '/wenku8/lastupdate', + parameters: { category: '首页分类,见下表,默认为今日更新' }, + features: { + requireConfig: [ + { + name: 'WENKU8_COOKIE', + description: '登陆轻小说文库后的 cookie', + }, + ], + }, + name: '首页分类', maintainers: ['Fatpandac'], + description: `| 今日更新 | 完结全本 | 新书一览 | 动画化作品 | 热门轻小说 | 轻小说列表 | +| :--------: | :------: | :------: | :--------: | :--------: | :---------: | +| lastupdate | fullflag | postdate | anime | allvisit | articlelist |`, handler, }; diff --git a/lib/routes/whu/hyxt.ts b/lib/routes/whu/hyxt.ts index bad55684e..76377b8b8 100644 --- a/lib/routes/whu/hyxt.ts +++ b/lib/routes/whu/hyxt.ts @@ -8,9 +8,52 @@ import { domain, getMeta, processItems, processMeta } from './util'; export const route: Route = { path: '/hyxt/:category{.+}?', - name: 'Unknown', - maintainers: [], + categories: ['university'], + example: '/whu/hyxt', + parameters: { category: '分类,见下表,默认为 `tzgg`, 即 **通知公告**' }, + name: '弘毅学堂', + maintainers: ['nczitzk'], handler, + description: `| 新闻动态 | 通知公告 | 学子风采 | 学术论坛 | +| -------- | -------- | -------- | -------- | +| xwdt | tzgg | xzfc | xslt | + +
+ 更多分类 + +#### 学堂简报 + +| 学堂简报 | +| -------- | +| xtjb | + +#### 人才培养 + +| 人才培养 | 招生工作 | 培养方案 | 科研训练 | 毕业去向 | 学习资源 | +| -------- | --------- | --------- | --------- | --------- | --------- | +| rcpy | rcpy/zsgz | rcpy/pyfa | rcpy/kyxl | rcpy/byqx | rcpy/xxzy | + +#### 学生工作 + +| 学生工作 | 党团建设 | 学术交流 | 书院生活 | 奖助体系 | 事务服务 | +| -------- | --------- | --------- | --------- | --------- | --------- | +| xsgz | xsgz/dtjs | xsgz/xsjl | xsgz/sysh | xsgz/jztx | xsgz/swfw | + +#### 国际合作 + +| 国际合作 | 国际交流 | 交流分享 | +| -------- | --------- | --------- | +| gjhz | gjhz/gjjl | gjhz/jlfx | + +#### 校友风采 + +| 校友风采 | +| -------- | +| xyfc | + +
+ +此外 route 后可以加上 \`?limit=n\` 的查询参数,表示只获取前 n 条内容;如果不指定默认为 30。`, }; async function handler(ctx) { diff --git a/lib/routes/whu/news.ts b/lib/routes/whu/news.ts index 0a63882c2..5d93ac6f1 100644 --- a/lib/routes/whu/news.ts +++ b/lib/routes/whu/news.ts @@ -11,9 +11,9 @@ export const route: Route = { path: '/news/:category{.+}?', categories: ['university'], example: '/whu/news', - parameters: { category: '新闻栏目,可选' }, + parameters: { category: '分类,见下表,默认为 `wdzx/wdyw`, 即 **武大要闻**' }, name: '新闻网', - maintainers: [], + maintainers: ['SChen1024', 'nczitzk'], handler, description: `category 参数可选,范围如下: diff --git a/lib/routes/wiensued/index.ts b/lib/routes/wiensued/index.ts index c29b25015..b80788418 100644 --- a/lib/routes/wiensued/index.ts +++ b/lib/routes/wiensued/index.ts @@ -1,7 +1,6 @@ import { load } from 'cheerio'; import type { Data, DataItem, Route } from '@/types'; -import { getSubPath } from '@/utils/common-utils'; import ofetch from '@/utils/ofetch'; const FEED_LANGUAGE = 'de' as const; @@ -11,15 +10,16 @@ const BASE_URL = 'https://www.wiensued.at/' as const; export const route: Route = { name: 'Objekte', example: '/wiensued/city=Wien&search=&space-from=30&space-to=100&room-from=2&room-to=4&rent=1&property=1&state[]=inplanung&state[]=inbau&state[]=sofort&state[]=bestand', - path: '*', + path: '/:path{.+}?', + parameters: { path: 'Query parameters and/or the path leading up to the listing, see the description below' }, maintainers: ['sk22'], categories: ['other'], description: `Pass in the parameters (e.g. \`city=Wien&state[]=sofort\`) and/or the path leading up to the listing (e.g. \`wohnen/sofort-verfuegbar\`)`, async handler(ctx) { - // ['', 'wohnen', 'sofort-verfuegbar', 'city=Wien'] - const parts = getSubPath(ctx).split('/'); + // ['wohnen', 'sofort-verfuegbar', 'city=Wien'] + const parts = (ctx.req.param('path') ?? '').split('/'); const subPaths = parts.filter((p) => p.length && !p.includes('=')); if (subPaths.length === 0) { subPaths.push('wohnen'); diff --git a/lib/routes/wmc-bj/publish.tsx b/lib/routes/wmc-bj/publish.tsx index b6df8e65d..f465490c0 100644 --- a/lib/routes/wmc-bj/publish.tsx +++ b/lib/routes/wmc-bj/publish.tsx @@ -8,9 +8,19 @@ import timezone from '@/utils/timezone'; export const route: Route = { path: '/publish/:category{.+}?', - name: 'Unknown', - maintainers: [], + categories: ['other'], + example: '/wmc-bj/publish/CRA-Reanalysis/2m-Temperature/6-hour/index.html', + parameters: { + category: 'Category, can be found in URL, `CRA-Reanalysis/2m-Temperature/6-hour/index.html` by default', + }, + name: 'Publish', + maintainers: ['nczitzk'], handler, + description: `::: tip +\`category\` is the text after \`publish/\` in the URL. + +eg. The URL for [Monitoring\\_CMA-RA\\_2m-Temperature\\_6-hour](http://www.wmc-bj.net/publish/CRA-Reanalysis/2m-Temperature/6-hour/index.html) is . The \`category\` for route can be represented as [\`/wmc-bj/publish/CRA-Reanalysis/2m-Temperature/6-hour/index.html\`](https://rsshub.app/wmc-bj/publish/CRA-Reanalysis/2m-Temperature/6-hour/index.html). +:::`, }; async function handler(ctx) { diff --git a/lib/routes/worldjournal/index.ts b/lib/routes/worldjournal/index.ts index fd280e026..c7e33bc59 100644 --- a/lib/routes/worldjournal/index.ts +++ b/lib/routes/worldjournal/index.ts @@ -10,14 +10,17 @@ const baseUrl = 'https://www.worldjournal.com'; export const route: Route = { path: '/:path{.+}?', + categories: ['new-media'], + example: '/worldjournal', + parameters: { path: 'URL 中 `/wj/` 後的路徑,預設為 `cate/breaking`' }, radar: [ { source: ['worldjournal.com/wj/*path'], target: '/:path', }, ], - name: 'Unknown', - maintainers: [], + name: '新聞', + maintainers: ['TonyRL'], handler, url: 'worldjournal.com/wj/*path', }; diff --git a/lib/routes/wzu/news.ts b/lib/routes/wzu/news.ts index e73e22618..7ff41459f 100644 --- a/lib/routes/wzu/news.ts +++ b/lib/routes/wzu/news.ts @@ -52,7 +52,13 @@ async function loadContent(link) { export const route: Route = { path: '/news/:type?', - name: 'Unknown', + categories: ['university'], + example: '/wzu/news/0', + parameters: { type: '分类,见下表 默认为`0`' }, + description: `| 温大新闻 | 媒体温大 | 学术温大 | 通知公告 | 招标信息 | 学术公告 | +| :------: | :------: | :------: | :------: | :------: | :------: | +| 0 | 1 | 2 | 3 | 4 | 5 |`, + name: '新闻', maintainers: ['Chandler-Lu'], handler, }; diff --git a/lib/routes/xjtu/dyyy/index.ts b/lib/routes/xjtu/dyyy/index.ts index bcd7451b4..274152e5b 100644 --- a/lib/routes/xjtu/dyyy/index.ts +++ b/lib/routes/xjtu/dyyy/index.ts @@ -9,8 +9,11 @@ const baseUrl = 'http://www.dyyy.xjtu.edu.cn'; export const route: Route = { path: '/dyyy/:path{.+}', - name: 'Unknown', - maintainers: [], + categories: ['university'], + example: '/xjtu/dyyy/index/xsxx', + parameters: { path: '栏目路径,支持多级,不包括末尾的`.htm`' }, + name: '第一附属医院新闻', + maintainers: ['TonyRL'], handler, }; diff --git a/lib/routes/xjtu/international.ts b/lib/routes/xjtu/international.ts index f6af36582..d5defa05b 100644 --- a/lib/routes/xjtu/international.ts +++ b/lib/routes/xjtu/international.ts @@ -7,8 +7,11 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/international/:subpath{.+}', - name: 'Unknown', - maintainers: [], + categories: ['university'], + example: '/xjtu/international/hzjl', + parameters: { subpath: '栏目路径,支持多级,不包括末尾的`.htm`' }, + name: '国际处通知', + maintainers: ['guitaoliu'], handler, }; diff --git a/lib/routes/xmnn/news.ts b/lib/routes/xmnn/news.ts index 754a900a6..e988aa967 100644 --- a/lib/routes/xmnn/news.ts +++ b/lib/routes/xmnn/news.ts @@ -8,9 +8,37 @@ import timezone from '@/utils/timezone'; export const route: Route = { path: '/news/:category{.+}?', - name: 'Unknown', - maintainers: [], + categories: ['traditional-media'], + example: '/xmnn/news/xmxw', + parameters: { category: '分类 id,见下表,默认为厦门新闻' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['news.xmnn.cn/:category'], + target: '/news/:category', + }, + ], + name: '新闻', + maintainers: ['nczitzk'], handler, + description: `| 分类名 | 分类 id | +| ------------ | ------- | +| 厦门新闻发布 | xmxwfb | +| 厦门新闻 | xmxw | +| 本网快报 | bwkb | +| 厦门网眼 | xmwy | +| 福建新闻 | fjxw | +| 国内新闻 | gnxw | +| 国际新闻 | gjxw | +| 台海新闻 | thxw | +| 社会新闻 | shxw |`, }; async function handler(ctx) { diff --git a/lib/routes/xmut/jwc/bkjw.ts b/lib/routes/xmut/jwc/bkjw.ts index 7e17f0a64..a413bba45 100644 --- a/lib/routes/xmut/jwc/bkjw.ts +++ b/lib/routes/xmut/jwc/bkjw.ts @@ -9,9 +9,15 @@ const xmut = 'https://jwc.xmut.edu.cn'; export const route: Route = { path: '/jwc/bkjw/:category?', - name: 'Unknown', - maintainers: [], + categories: ['university'], + example: '/xmut/jwc/bkjw/jxyx', + parameters: { category: '分类如下表' }, + name: '本科生教务处', + maintainers: ['icecliffs'], handler, + description: `| 教学运行 | 综合事务 | 学务管理 | 实践教学 | 教研教改 | +| :------: | :------: | :------: | :------: | :------: | +| jxyx | zhsw | xwgl | sjjx | jyjg |`, }; async function handler(ctx) { diff --git a/lib/routes/xmut/jwc/yjs.ts b/lib/routes/xmut/jwc/yjs.ts index 8d0ee5008..d57485c5a 100644 --- a/lib/routes/xmut/jwc/yjs.ts +++ b/lib/routes/xmut/jwc/yjs.ts @@ -9,9 +9,15 @@ const xmut = 'https://yjs.xmut.edu.cn'; export const route: Route = { path: '/jwc/yjjw/:category?', - name: 'Unknown', - maintainers: [], + categories: ['university'], + example: '/xmut/jwc/yjjw/tzgg', + parameters: { category: '分类如下表' }, + name: '研究生处', + maintainers: ['icecliffs'], handler, + description: `| 通知公告 | 新闻动态 | 学术研究 | 工作简讯 | +| :------: | :------: | :------: | :------: | +| tzgg | xwdt | xstj | yjsjw |`, }; async function handler(ctx) { diff --git a/lib/routes/xueqiu/stock-comments.tsx b/lib/routes/xueqiu/stock-comments.tsx index 6cfe9e76c..da5a83792 100644 --- a/lib/routes/xueqiu/stock-comments.tsx +++ b/lib/routes/xueqiu/stock-comments.tsx @@ -27,7 +27,7 @@ export const route: Route = { }, ], name: '股票评论', - maintainers: [], + maintainers: ['zytomorrow'], handler, }; diff --git a/lib/routes/xyzrank/hot-episodes-new.ts b/lib/routes/xyzrank/hot-episodes-new.ts new file mode 100644 index 000000000..a135fe471 --- /dev/null +++ b/lib/routes/xyzrank/hot-episodes-new.ts @@ -0,0 +1,19 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/hot-episodes-new', + categories: ['multimedia'], + example: '/xyzrank/hot-episodes-new', + radar: [ + { + source: ['xyzrank.com/'], + target: '/hot-episodes-new', + }, + ], + name: '新锐节目', + maintainers: ['nczitzk'], + handler, + url: 'xyzrank.com/', +}; diff --git a/lib/routes/xyzrank/hot-podcasts.ts b/lib/routes/xyzrank/hot-podcasts.ts new file mode 100644 index 000000000..db42ef8b0 --- /dev/null +++ b/lib/routes/xyzrank/hot-podcasts.ts @@ -0,0 +1,19 @@ +import type { Route } from '@/types'; + +import { handler } from './index'; + +export const route: Route = { + path: '/hot-podcasts', + categories: ['multimedia'], + example: '/xyzrank/hot-podcasts', + radar: [ + { + source: ['xyzrank.com/'], + target: '/hot-podcasts', + }, + ], + name: '热门播客', + maintainers: ['nczitzk'], + handler, + url: 'xyzrank.com/', +}; diff --git a/lib/routes/xyzrank/index.tsx b/lib/routes/xyzrank/index.tsx index 7e5196544..b834ef5db 100644 --- a/lib/routes/xyzrank/index.tsx +++ b/lib/routes/xyzrank/index.tsx @@ -2,25 +2,28 @@ import { load } from 'cheerio'; import { renderToString } from 'hono/jsx/dom/server'; import type { Route } from '@/types'; +import { getSubPath } from '@/utils/common-utils'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { - path: '/:category?', + path: '/', + categories: ['multimedia'], + example: '/xyzrank', radar: [ { source: ['xyzrank.com/'], - target: '', + target: '/', }, ], - name: 'Unknown', - maintainers: [], + name: '热门节目', + maintainers: ['nczitzk'], handler, url: 'xyzrank.com/', }; -async function handler(ctx) { - const category = ctx.req.param('category') ?? ''; +export async function handler(ctx) { + const category = getSubPath(ctx).slice(1); const rootUrl = 'https://xyzrank.com'; const currentUrl = `${rootUrl}/#/${category}`; @@ -32,36 +35,25 @@ async function handler(ctx) { const $ = load(response.data); - response = await got({ - method: 'get', - url: response.data.match(/