diff --git a/lib/routes/apple/apps.ts b/lib/routes/apple/apps.ts
index a243fba251..e638747938 100644
--- a/lib/routes/apple/apps.ts
+++ b/lib/routes/apple/apps.ts
@@ -1,4 +1,4 @@
-import { Route } from '@/types';
+import { Route, ViewType } from '@/types';
import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
@@ -17,9 +17,34 @@ const platforms = {
export const route: Route = {
path: '/apps/update/:country/:id/:platform?',
- categories: ['program-update'],
+ categories: ['program-update', 'popular'],
+ view: ViewType.Notifications,
example: '/apple/apps/update/us/id408709785',
- parameters: { country: 'App Store Country, obtain from the app URL, see below', id: 'App id, obtain from the app URL', platform: 'App Platform, see below, all by default' },
+ parameters: {
+ country: 'App Store Country, obtain from the app URL, see below',
+ id: 'App id, obtain from the app URL',
+ platform: {
+ description: 'App Platform, see below, all by default',
+ options: [
+ {
+ value: 'All',
+ label: 'all',
+ },
+ {
+ value: 'iOS',
+ label: 'iOS',
+ },
+ {
+ value: 'macOS',
+ label: 'macOS',
+ },
+ {
+ value: 'tvOS',
+ label: 'tvOS',
+ },
+ ],
+ },
+ },
features: {
requireConfig: false,
requirePuppeteer: false,
@@ -37,10 +62,7 @@ export const route: Route = {
name: 'App Update',
maintainers: ['EkkoG', 'nczitzk'],
handler,
- description: `| All | iOS | macOS | tvOS |
- | --- | --- | ----- | ---- |
- | | iOS | macOS | tvOS |
-
+ description: `
:::tip
For example, the URL of [GarageBand](https://apps.apple.com/us/app/messages/id408709785) in the App Store is \`https://apps.apple.com/us/app/messages/id408709785\`. In this case, the \`App Store Country\` parameter for the route is \`us\`, and the \`App id\` parameter is \`id1146560473\`. So the route should be [\`/apple/apps/update/us/id408709785\`](https://rsshub.app/apple/apps/update/us/id408709785).
:::`,
@@ -52,7 +74,7 @@ async function handler(ctx) {
let platformId;
- if (platform) {
+ if (platform && platform !== 'all') {
platform = platform.toLowerCase();
platformId = Object.hasOwn(platforms, platform) ? platforms[platform] : platform;
}
diff --git a/lib/routes/epicgames/index.ts b/lib/routes/epicgames/index.ts
index c30f963bcc..4a435895ff 100644
--- a/lib/routes/epicgames/index.ts
+++ b/lib/routes/epicgames/index.ts
@@ -1,4 +1,4 @@
-import { Route } from '@/types';
+import { Route, ViewType } from '@/types';
import { getCurrentPath } from '@/utils/helpers';
const __dirname = getCurrentPath(import.meta.url);
@@ -10,9 +10,19 @@ import dayjs from 'dayjs';
export const route: Route = {
path: '/freegames/:locale?/:country?',
- categories: ['game'],
+ categories: ['game', 'popular'],
+ view: ViewType.Notifications,
example: '/epicgames/freegames',
- parameters: { locale: 'Locale, en_US by default', country: 'Country, US by default' },
+ parameters: {
+ locale: {
+ description: 'Locale',
+ default: 'en-US',
+ },
+ country: {
+ description: 'Country',
+ default: 'US',
+ },
+ },
features: {
requireConfig: false,
requirePuppeteer: false,
diff --git a/lib/routes/github/activity.ts b/lib/routes/github/activity.ts
index 0e1ffa7a17..0865e33bf3 100644
--- a/lib/routes/github/activity.ts
+++ b/lib/routes/github/activity.ts
@@ -1,4 +1,4 @@
-import { Route } from '@/types';
+import { Route, ViewType } from '@/types';
import ofetch from '@/utils/ofetch';
import { parseDate } from '@/utils/parse-date';
import Parser from 'rss-parser';
@@ -10,7 +10,8 @@ export const route: Route = {
name: 'User Activities',
maintainers: ['hyoban'],
example: '/github/activity/DIYgod',
- categories: ['programming'],
+ categories: ['programming', 'popular'],
+ view: ViewType.Articles,
parameters: {
user: 'GitHub username',
},
diff --git a/lib/routes/github/star.ts b/lib/routes/github/star.ts
index d7597ee233..cb3eaa65f5 100644
--- a/lib/routes/github/star.ts
+++ b/lib/routes/github/star.ts
@@ -1,12 +1,13 @@
-import { Route } from '@/types';
+import { Route, ViewType } from '@/types';
import got from '@/utils/got';
import { config } from '@/config';
import ConfigNotFoundError from '@/errors/types/config-not-found';
export const route: Route = {
path: '/stars/:user/:repo',
- categories: ['programming'],
- example: '/github/stars/DIYGod/RSSHub',
+ categories: ['programming', 'popular'],
+ example: '/github/stars/DIYgod/RSSHub',
+ view: ViewType.Notifications,
parameters: { user: 'GitHub username', repo: 'GitHub repo name' },
features: {
requireConfig: [
diff --git a/lib/routes/github/trending.ts b/lib/routes/github/trending.ts
index a7c31e9e93..8abb894bc3 100644
--- a/lib/routes/github/trending.ts
+++ b/lib/routes/github/trending.ts
@@ -1,4 +1,4 @@
-import { Route } from '@/types';
+import { Route, ViewType } from '@/types';
import { getCurrentPath } from '@/utils/helpers';
const __dirname = getCurrentPath(import.meta.url);
@@ -11,12 +11,34 @@ import ConfigNotFoundError from '@/errors/types/config-not-found';
export const route: Route = {
path: '/trending/:since/:language/:spoken_language?',
- categories: ['programming'],
+ categories: ['programming', 'popular'],
example: '/github/trending/daily/javascript/en',
+ view: ViewType.Articles,
parameters: {
- since: "time frame, available in [Trending page](https://github.com/trending/javascript?since=monthly) 's URL, possible values are: `daily`, `weekly` or `monthly`",
- language: "the feed language, available in [Trending page](https://github.com/trending/javascript?since=monthly) 's URL, don't filter option is `any`",
- spoken_language: "natural language, available in [Trending page](https://github.com/trending/javascript?since=monthly) 's URL",
+ since: {
+ description: 'time range',
+ options: [
+ {
+ value: 'daily',
+ label: 'Today',
+ },
+ {
+ value: 'weekly',
+ label: 'This week',
+ },
+ {
+ value: 'monthly',
+ label: 'This month',
+ },
+ ],
+ },
+ language: {
+ description: "the feed language, available in [Trending page](https://github.com/trending/javascript?since=monthly) 's URL, don't filter option is `any`",
+ default: 'any',
+ },
+ spoken_language: {
+ description: "natural language, available in [Trending page](https://github.com/trending/javascript?since=monthly) 's URL",
+ },
},
features: {
requireConfig: [
diff --git a/lib/routes/google/citations.ts b/lib/routes/google/citations.ts
index fcd80fb24a..bb3a6d722f 100644
--- a/lib/routes/google/citations.ts
+++ b/lib/routes/google/citations.ts
@@ -4,7 +4,7 @@ import { load } from 'cheerio';
export const route: Route = {
path: '/citations/:id',
- categories: ['journal'],
+ categories: ['journal', 'popular'],
example: '/google/citations/mlmE4JMAAAAJ',
parameters: { id: 'N' },
features: {
@@ -15,7 +15,7 @@ export const route: Route = {
supportPodcast: false,
supportScihub: false,
},
- name: 'Author Citations',
+ name: 'Scholar Author Citations',
maintainers: ['KellyHwong', 'const7'],
handler,
description: `The parameter id in the route is the id in the URL of the user's Google Scholar reference page, for example \`https://scholar.google.com/citations?user=mlmE4JMAAAAJ\` to \`mlmE4JMAAAAJ\`.
diff --git a/lib/routes/google/scholar.ts b/lib/routes/google/scholar.ts
index 717b167bad..c3b3749276 100644
--- a/lib/routes/google/scholar.ts
+++ b/lib/routes/google/scholar.ts
@@ -4,7 +4,7 @@ import { load } from 'cheerio';
export const route: Route = {
path: '/scholar/:query',
- categories: ['journal'],
+ categories: ['journal', 'popular'],
example: '/google/scholar/data+visualization',
parameters: { query: 'query statement which supports「Basic」and「Advanced」modes' },
features: {
@@ -15,7 +15,7 @@ export const route: Route = {
supportPodcast: false,
supportScihub: false,
},
- name: 'Keywords Monitoring',
+ name: 'Scholar Keywords Monitoring',
maintainers: ['HenryQW'],
handler,
description: `:::warning
diff --git a/lib/routes/instagram/private-api/index.ts b/lib/routes/instagram/private-api/index.ts
index 45e6f481fd..bd4bd539dc 100644
--- a/lib/routes/instagram/private-api/index.ts
+++ b/lib/routes/instagram/private-api/index.ts
@@ -58,7 +58,7 @@ async function loadContent(category, nameOrId, tryGet) {
export const route: Route = {
path: '/:category/:key',
- categories: ['social-media', 'popular'],
+ categories: ['social-media'],
view: ViewType.SocialMedia,
example: '/instagram/user/stefaniejoosten',
parameters: {
diff --git a/lib/routes/jjwxc/book.ts b/lib/routes/jjwxc/book.ts
index dcfa370563..7f5f76ae0c 100644
--- a/lib/routes/jjwxc/book.ts
+++ b/lib/routes/jjwxc/book.ts
@@ -1,4 +1,4 @@
-import { Route } from '@/types';
+import { Route, ViewType } from '@/types';
import { getCurrentPath } from '@/utils/helpers';
const __dirname = getCurrentPath(import.meta.url);
@@ -13,7 +13,8 @@ import path from 'node:path';
export const route: Route = {
path: '/book/:id?',
- categories: ['reading'],
+ categories: ['reading', 'popular'],
+ view: ViewType.Notifications,
example: '/jjwxc/book/7013024',
parameters: { id: '作品 id,可在对应作品页中找到' },
features: {
@@ -24,7 +25,7 @@ export const route: Route = {
supportPodcast: false,
supportScihub: false,
},
- name: '作品',
+ name: '作品章节',
maintainers: ['nczitzk'],
handler,
};
diff --git a/lib/routes/nasa/apod.ts b/lib/routes/nasa/apod.ts
index 391008c5f2..7f037fdcf4 100644
--- a/lib/routes/nasa/apod.ts
+++ b/lib/routes/nasa/apod.ts
@@ -1,4 +1,4 @@
-import { Route } from '@/types';
+import { Route, ViewType } from '@/types';
import cache from '@/utils/cache';
import got from '@/utils/got';
import { load } from 'cheerio';
@@ -7,7 +7,8 @@ import timezone from '@/utils/timezone';
export const route: Route = {
path: '/apod',
- categories: ['picture'],
+ categories: ['picture', 'popular'],
+ view: ViewType.Pictures,
example: '/nasa/apod',
parameters: {},
features: {
@@ -23,7 +24,7 @@ export const route: Route = {
source: ['apod.nasa.govundefined'],
},
],
- name: 'NASA',
+ name: 'Astronomy Picture of the Day',
maintainers: ['nczitzk', 'williamgateszhao'],
handler,
url: 'apod.nasa.govundefined',
diff --git a/lib/routes/nasa/namespace.ts b/lib/routes/nasa/namespace.ts
index d53c8c1930..177418d2fc 100644
--- a/lib/routes/nasa/namespace.ts
+++ b/lib/routes/nasa/namespace.ts
@@ -1,6 +1,6 @@
import type { Namespace } from '@/types';
export const namespace: Namespace = {
- name: 'NASA Astronomy Picture of the Day',
+ name: 'NASA',
url: 'apod.nasa.gov',
};
diff --git a/lib/routes/nga/forum.ts b/lib/routes/nga/forum.ts
index efdde7c5ce..6b7f492814 100644
--- a/lib/routes/nga/forum.ts
+++ b/lib/routes/nga/forum.ts
@@ -1,4 +1,4 @@
-import { Route } from '@/types';
+import { Route, ViewType } from '@/types';
import cache from '@/utils/cache';
import got from '@/utils/got';
import { config } from '@/config';
@@ -8,7 +8,8 @@ const X_UA = 'NGA_skull/6.0.5(iPhone10,3;iOS 12.0.1)';
export const route: Route = {
path: '/forum/:fid/:recommend?',
- categories: ['bbs'],
+ categories: ['bbs', 'popular'],
+ view: ViewType.Articles,
example: '/nga/forum/489',
parameters: { fid: '分区 id, 可在分区主页 URL 找到, 没有 fid 时 stid 同样适用', recommend: '是否只显示精华主题, 留空为否, 任意值为是' },
features: {
diff --git a/lib/routes/picnob/namespace.ts b/lib/routes/picnob/namespace.ts
index 9a1fe65daf..d11cbc15f9 100644
--- a/lib/routes/picnob/namespace.ts
+++ b/lib/routes/picnob/namespace.ts
@@ -2,8 +2,5 @@ import type { Namespace } from '@/types';
export const namespace: Namespace = {
name: 'Instagram',
- url: 'picnob.com',
- description: `:::tip
-It's highly recommended to deploy with Redis cache enabled.
-:::`,
+ url: 'www.instagram.com',
};
diff --git a/lib/routes/picnob/user.ts b/lib/routes/picnob/user.ts
index 28ffd40f7c..5970728dce 100644
--- a/lib/routes/picnob/user.ts
+++ b/lib/routes/picnob/user.ts
@@ -1,4 +1,4 @@
-import { Route } from '@/types';
+import { Route, ViewType } from '@/types';
import { getCurrentPath } from '@/utils/helpers';
const __dirname = getCurrentPath(import.meta.url);
@@ -13,7 +13,7 @@ import puppeteer from '@/utils/puppeteer';
export const route: Route = {
path: '/user/:id',
- categories: ['social-media'],
+ categories: ['social-media', 'popular'],
example: '/picnob/user/xlisa_olivex',
parameters: { id: 'Instagram id' },
features: {
@@ -33,6 +33,7 @@ export const route: Route = {
name: 'User Profile - Picnob',
maintainers: ['TonyRL', 'micheal-death'],
handler,
+ view: ViewType.Pictures,
};
async function handler(ctx) {
diff --git a/lib/routes/picuki/namespace.ts b/lib/routes/picuki/namespace.ts
index b74e2b1dab..d11cbc15f9 100644
--- a/lib/routes/picuki/namespace.ts
+++ b/lib/routes/picuki/namespace.ts
@@ -2,8 +2,5 @@ import type { Namespace } from '@/types';
export const namespace: Namespace = {
name: 'Instagram',
- url: 'www.picuki.com',
- description: `:::tip
-It's highly recommended to deploy with Redis cache enabled.
-:::`,
+ url: 'www.instagram.com',
};
diff --git a/lib/routes/picuki/profile.ts b/lib/routes/picuki/profile.ts
index 98ca59f3c3..9297b5f41e 100644
--- a/lib/routes/picuki/profile.ts
+++ b/lib/routes/picuki/profile.ts
@@ -28,7 +28,16 @@ export const route: Route = {
path: '/profile/:id/:functionalFlag?',
categories: ['social-media'],
example: '/picuki/profile/stefaniejoosten',
- parameters: { id: 'Instagram id', functionalFlag: 'functional flag, see the table below' },
+ parameters: {
+ id: 'Instagram user id',
+ functionalFlag: `functional flag, see the table below
+| functionalFlag | Video embedding | Fetching Instagram Stories |
+| -------------- | --------------------------------------- | -------------------------- |
+| 0 | off, only show video poster as an image | off |
+| 1 (default) | on | off |
+| 10 | on | on |
+`,
+ },
features: {
requireConfig: false,
requirePuppeteer: false,
@@ -46,12 +55,7 @@ export const route: Route = {
name: 'User Profile - Picuki',
maintainers: ['hoilc', 'Rongronggg9', 'devinmugen'],
handler,
- description: `| functionalFlag | Video embedding | Fetching Instagram Stories |
- | -------------- | --------------------------------------- | -------------------------- |
- | 0 | off, only show video poster as an image | off |
- | 1 (default) | on | off |
- | 10 | on | on |
-
+ description: `
:::warning
Instagram Stories do not have a reliable guid. It is possible that your RSS reader show the same story more than once.
Though, every Story expires after 24 hours, so it may be not so serious.
diff --git a/lib/routes/ps/monthly-games.ts b/lib/routes/ps/monthly-games.ts
index a3c583fc16..b66a406a45 100644
--- a/lib/routes/ps/monthly-games.ts
+++ b/lib/routes/ps/monthly-games.ts
@@ -1,4 +1,4 @@
-import { Route } from '@/types';
+import { Route, ViewType } from '@/types';
import { getCurrentPath } from '@/utils/helpers';
const __dirname = getCurrentPath(import.meta.url);
@@ -9,7 +9,8 @@ import { art } from '@/utils/render';
export const route: Route = {
path: '/monthly-games',
- categories: ['game'],
+ categories: ['game', 'popular'],
+ view: ViewType.Notifications,
example: '/ps/monthly-games',
parameters: {},
features: {
diff --git a/lib/routes/qidian/chapter.ts b/lib/routes/qidian/chapter.ts
index 67e018b6a3..13f7f641b8 100644
--- a/lib/routes/qidian/chapter.ts
+++ b/lib/routes/qidian/chapter.ts
@@ -1,11 +1,12 @@
-import { Route } from '@/types';
+import { Route, ViewType } from '@/types';
import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
export const route: Route = {
path: '/chapter/:id',
- categories: ['reading'],
+ categories: ['reading', 'popular'],
+ view: ViewType.Notifications,
example: '/qidian/chapter/1010400217',
parameters: { id: '小说 id, 可在对应小说页 URL 中找到' },
features: {
@@ -21,7 +22,7 @@ export const route: Route = {
source: ['book.qidian.com/info/:id'],
},
],
- name: '章节',
+ name: '作品章节',
maintainers: ['fuzy112'],
handler,
};
diff --git a/lib/routes/smzdm/keyword.ts b/lib/routes/smzdm/keyword.ts
index d5d4799a2b..1161ebcf6c 100644
--- a/lib/routes/smzdm/keyword.ts
+++ b/lib/routes/smzdm/keyword.ts
@@ -1,4 +1,4 @@
-import { Route } from '@/types';
+import { Route, ViewType } from '@/types';
import got from '@/utils/got';
import { load } from 'cheerio';
import { parseDate } from '@/utils/parse-date';
@@ -6,7 +6,8 @@ import timezone from '@/utils/timezone';
export const route: Route = {
path: '/keyword/:keyword',
- categories: ['shopping'],
+ categories: ['shopping', 'popular'],
+ view: ViewType.Notifications,
example: '/smzdm/keyword/女装',
parameters: { keyword: '你想订阅的关键词' },
features: {
diff --git a/lib/routes/smzdm/ranking.ts b/lib/routes/smzdm/ranking.ts
index c12be8399e..608273fdc1 100644
--- a/lib/routes/smzdm/ranking.ts
+++ b/lib/routes/smzdm/ranking.ts
@@ -1,4 +1,4 @@
-import { Route } from '@/types';
+import { Route, ViewType } from '@/types';
import got from '@/utils/got';
import timezone from '@/utils/timezone';
@@ -15,9 +15,186 @@ const getTrueHour = (rank_type, rank_id, hour) => {
export const route: Route = {
path: '/ranking/:rank_type/:rank_id/:hour',
- categories: ['shopping'],
+ categories: ['shopping', 'popular'],
+ view: ViewType.Notifications,
example: '/smzdm/ranking/pinlei/11/3',
- parameters: { rank_type: '榜单类型', rank_id: '榜单ID', hour: '时间跨度' },
+ parameters: {
+ rank_type: {
+ description: '榜单类型',
+ options: [
+ {
+ value: 'pinlei',
+ label: '好价品类榜',
+ },
+ {
+ value: 'dianshang',
+ label: '好价电商榜',
+ },
+ {
+ value: 'haitao',
+ label: '海淘 TOP 榜',
+ },
+ {
+ value: 'haowen',
+ label: '好文排行榜',
+ },
+ {
+ value: 'haowu',
+ label: '好物排行榜',
+ },
+ ],
+ },
+ rank_id: {
+ description: '榜单ID',
+ options: [
+ {
+ label: '好价品类榜 - 全部',
+ value: '11',
+ },
+ {
+ label: '好价品类榜 - 食品生鲜',
+ value: '12',
+ },
+ {
+ label: '好价品类榜 - 电脑数码',
+ value: '13',
+ },
+ {
+ label: '好价品类榜 - 运动户外',
+ value: '14',
+ },
+ {
+ label: '好价品类榜 - 家用电器',
+ value: '15',
+ },
+ {
+ label: '好价品类榜 - 白菜',
+ value: '17',
+ },
+ {
+ label: '好价品类榜 - 服饰鞋包',
+ value: '74',
+ },
+ {
+ label: '好价品类榜 - 日用百货',
+ value: '75',
+ },
+ {
+ label: '好价电商榜 - 券活动',
+ value: '24',
+ },
+ {
+ label: '好价电商榜 - 京东',
+ value: '23',
+ },
+ {
+ label: '好价电商榜 - 天猫',
+ value: '25',
+ },
+ {
+ label: '好价电商榜 - 亚马逊中国',
+ value: '26',
+ },
+ {
+ label: '好价电商榜 - 国美在线',
+ value: '27',
+ },
+ {
+ label: '好价电商榜 - 苏宁易购',
+ value: '28',
+ },
+ {
+ label: '好价电商榜 - 网易',
+ value: '29',
+ },
+ {
+ label: '好价电商榜 - 西集网',
+ value: '30',
+ },
+ {
+ label: '好价电商榜 - 美国亚马逊',
+ value: '31',
+ },
+ {
+ label: '好价电商榜 - 日本亚马逊',
+ value: '32',
+ },
+ {
+ label: '好价电商榜 - ebay',
+ value: '33',
+ },
+ {
+ label: '海淘 TOP 榜 - 全部',
+ value: '39',
+ },
+ {
+ label: '海淘 TOP 榜 - 海外直邮',
+ value: '34',
+ },
+ {
+ label: '海淘 TOP 榜 - 美国榜',
+ value: '35',
+ },
+ {
+ label: '海淘 TOP 榜 - 欧洲榜',
+ value: '36',
+ },
+ {
+ label: '海淘 TOP 榜 - 澳新榜',
+ value: '37',
+ },
+ {
+ label: '海淘 TOP 榜 - 亚洲榜',
+ value: '38',
+ },
+ {
+ label: '海淘 TOP 榜 - 晒物榜',
+ value: 'hsw',
+ },
+ {
+ label: '好文排行榜 - 原创',
+ value: 'yc',
+ },
+ {
+ label: '好文排行榜 - 资讯',
+ value: 'zx',
+ },
+ {
+ label: '好物排行榜 - 新晋榜',
+ value: 'hwall',
+ },
+ {
+ label: '好物排行榜 - 消费众测',
+ value: 'zc',
+ },
+ {
+ label: '好物排行榜 - 新锐品牌',
+ value: 'nb',
+ },
+ {
+ label: '好物排行榜 - 好物榜单',
+ value: 'hw',
+ },
+ ],
+ },
+ hour: {
+ description: '时间跨度',
+ options: [
+ {
+ value: '3',
+ label: '3 小时',
+ },
+ {
+ value: '12',
+ label: '12 小时',
+ },
+ {
+ value: '24',
+ label: '24 小时',
+ },
+ ],
+ },
+ },
features: {
requireConfig: false,
requirePuppeteer: false,
@@ -29,49 +206,6 @@ export const route: Route = {
name: '排行榜',
maintainers: ['DIYgod'],
handler,
- description: `- 榜单类型
-
- | 好价品类榜 | 好价电商榜 | 海淘 TOP 榜 | 好文排行榜 | 好物排行榜 |
- | ---------- | ---------- | ----------- | ---------- | ---------- |
- | pinlei | dianshang | haitao | haowen | haowu |
-
- - 榜单 ID
-
- 好价品类榜
-
- | 全部 | 食品生鲜 | 电脑数码 | 运动户外 | 家用电器 | 白菜 | 服饰鞋包 | 日用百货 |
- | ---- | -------- | -------- | -------- | -------- | ---- | -------- | -------- |
- | 11 | 12 | 13 | 14 | 15 | 17 | 74 | 75 |
-
- 好价电商榜
-
- | 券活动 | 京东 | 天猫 | 亚马逊中国 | 国美在线 | 苏宁易购 | 网易 | 西集网 | 美国亚马逊 | 日本亚马逊 | ebay |
- | ------ | ---- | ---- | ---------- | -------- | -------- | ---- | ------ | ---------- | ---------- | ---- |
- | 24 | 23 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
-
- 海淘 TOP 榜
-
- | 全部 | 海外直邮 | 美国榜 | 欧洲榜 | 澳新榜 | 亚洲榜 | 晒物榜 |
- | ---- | -------- | ------ | ------ | ------ | ------ | ------ |
- | 39 | 34 | 35 | 36 | 37 | 38 | hsw |
-
- 好文排行榜
-
- | 原创 | 资讯 |
- | ---- | ---- |
- | yc | zx |
-
- 好物排行榜
-
- | 新晋榜 | 消费众测 | 新锐品牌 | 好物榜单 |
- | ------ | -------- | -------- | -------- |
- | hwall | zc | nb | hw |
-
- - 时间跨度
-
- | 3 小时 | 12 小时 | 24 小时 |
- | ------ | ------- | ------- |
- | 3 | 12 | 24 |`,
};
async function handler(ctx) {
diff --git a/lib/routes/spotify/artist.ts b/lib/routes/spotify/artist.ts
index fef440bd0c..9cc9028c4a 100644
--- a/lib/routes/spotify/artist.ts
+++ b/lib/routes/spotify/artist.ts
@@ -1,11 +1,12 @@
-import { Route } from '@/types';
+import { Route, ViewType } from '@/types';
import utils from './utils';
import { parseDate } from '@/utils/parse-date';
import ofetch from '@/utils/ofetch';
export const route: Route = {
path: '/artist/:id',
- categories: ['multimedia'],
+ categories: ['multimedia', 'popular'],
+ view: ViewType.Audios,
example: '/spotify/artist/6k9TBCxyr4bXwZ8Y21Kwn1',
parameters: { id: 'Artist ID' },
features: {
diff --git a/lib/routes/spotify/playlist.ts b/lib/routes/spotify/playlist.ts
index dffc8aae60..b050854a47 100644
--- a/lib/routes/spotify/playlist.ts
+++ b/lib/routes/spotify/playlist.ts
@@ -1,11 +1,12 @@
-import { Route } from '@/types';
+import { Route, ViewType } from '@/types';
import utils from './utils';
import { parseDate } from '@/utils/parse-date';
import ofetch from '@/utils/ofetch';
export const route: Route = {
path: '/playlist/:id',
- categories: ['multimedia'],
+ categories: ['multimedia', 'popular'],
+ view: ViewType.Audios,
example: '/spotify/playlist/4UBVy1LttvodwivPUuwJk2',
parameters: { id: 'Playlist ID' },
features: {
diff --git a/lib/routes/sspai/index.ts b/lib/routes/sspai/index.ts
index 6216d0011a..085b66347b 100644
--- a/lib/routes/sspai/index.ts
+++ b/lib/routes/sspai/index.ts
@@ -1,11 +1,12 @@
-import { Route } from '@/types';
+import { Route, ViewType } from '@/types';
import cache from '@/utils/cache';
import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
export const route: Route = {
path: '/index',
- categories: ['new-media'],
+ categories: ['new-media', 'popular'],
+ view: ViewType.Articles,
example: '/sspai/index',
parameters: {},
features: {
diff --git a/lib/routes/v2ex/tab.ts b/lib/routes/v2ex/tab.ts
index a0ba456e01..5eae5c5210 100644
--- a/lib/routes/v2ex/tab.ts
+++ b/lib/routes/v2ex/tab.ts
@@ -1,11 +1,12 @@
-import { Route } from '@/types';
+import { Route, ViewType } from '@/types';
import cache from '@/utils/cache';
import got from '@/utils/got';
import { load } from 'cheerio';
export const route: Route = {
path: '/tab/:tabid',
- categories: ['bbs'],
+ categories: ['bbs', 'popular'],
+ view: ViewType.Articles,
example: '/v2ex/tab/hot',
parameters: { tabid: 'tab标签ID,在 URL 可以找到' },
features: {
diff --git a/lib/routes/v2ex/topics.ts b/lib/routes/v2ex/topics.ts
index 068509d860..4e514369a8 100644
--- a/lib/routes/v2ex/topics.ts
+++ b/lib/routes/v2ex/topics.ts
@@ -1,12 +1,27 @@
-import { Route } from '@/types';
+import { Route, ViewType } from '@/types';
import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
export const route: Route = {
path: '/topics/:type',
- categories: ['bbs'],
+ categories: ['bbs', 'popular'],
+ view: ViewType.Articles,
example: '/v2ex/topics/latest',
- parameters: { type: 'hot 或 latest' },
+ parameters: {
+ type: {
+ description: '主题类型',
+ options: [
+ {
+ value: 'hot',
+ label: '最热主题',
+ },
+ {
+ value: 'latest',
+ label: '最新主题',
+ },
+ ],
+ },
+ },
features: {
requireConfig: false,
requirePuppeteer: false,
diff --git a/lib/routes/weibo/namespace.ts b/lib/routes/weibo/namespace.ts
index 2b09d4bb02..faab28543f 100644
--- a/lib/routes/weibo/namespace.ts
+++ b/lib/routes/weibo/namespace.ts
@@ -1,7 +1,7 @@
import type { Namespace } from '@/types';
export const namespace: Namespace = {
- name: '微博绿洲',
+ name: '微博',
url: 'weibo.com',
description: `:::warning
微博会针对请求的来源地区返回不同的结果。\
diff --git a/lib/routes/weibo/search/hot.ts b/lib/routes/weibo/search/hot.ts
index 3656a4f718..833baa82be 100644
--- a/lib/routes/weibo/search/hot.ts
+++ b/lib/routes/weibo/search/hot.ts
@@ -1,4 +1,4 @@
-import { Route } from '@/types';
+import { Route, ViewType } from '@/types';
import { getCurrentPath } from '@/utils/helpers';
const __dirname = getCurrentPath(import.meta.url);
@@ -16,9 +16,18 @@ let fullpic = 'false';
export const route: Route = {
path: '/search/hot/:fulltext?',
- categories: ['social-media'],
+ categories: ['social-media', 'popular'],
+ view: ViewType.SocialMedia,
example: '/weibo/search/hot',
- parameters: { fulltext: 'N' },
+ parameters: {
+ fulltext: {
+ description: `
+- 使用\`/weibo/search/hot\`可以获取热搜条目列表;
+- 使用\`/weibo/search/hot/fulltext\`可以进一步获取热搜条目下的摘要信息(不含图片视频);
+- 使用\`/weibo/search/hot/fulltext?pic=true\`可以获取图片缩略(但需要配合额外的手段,例如浏览器上的 Header Editor 等来修改 referer 参数为\`https://weibo.com\`,以规避微博的外链限制,否则图片无法显示。)
+- 使用\`/weibo/search/hot/fulltext?pic=true&fullpic=true\`可以获取 Original 图片(但需要配合额外的手段,例如浏览器上的 Header Editor 等来修改 referer 参数为\`https://weibo.com\`,以规避微博的外链限制,否则图片无法显示。)`,
+ },
+ },
features: {
requireConfig: false,
requirePuppeteer: false,
@@ -36,10 +45,6 @@ export const route: Route = {
maintainers: ['xyqfer', 'shinemoon'],
handler,
url: 's.weibo.com/top/summary',
- description: `- 使用\`/weibo/search/hot\`可以获取热搜条目列表;
-- 使用\`/weibo/search/hot/fulltext\`可以进一步获取热搜条目下的摘要信息(不含图片视频);
-- 使用\`/weibo/search/hot/fulltext?pic=true\`可以获取图片缩略(但需要配合额外的手段,例如浏览器上的 Header Editor 等来修改 referer 参数为\`https://weibo.com\`,以规避微博的外链限制,否则图片无法显示。)
-- 使用\`/weibo/search/hot/fulltext?pic=true&fullpic=true\`可以获取 Original 图片(但需要配合额外的手段,例如浏览器上的 Header Editor 等来修改 referer 参数为\`https://weibo.com\`,以规避微博的外链限制,否则图片无法显示。)`,
};
async function handler(ctx) {
diff --git a/lib/routes/zhihu/hot.ts b/lib/routes/zhihu/hot.ts
index aad6e96b30..5abd8ea2ae 100644
--- a/lib/routes/zhihu/hot.ts
+++ b/lib/routes/zhihu/hot.ts
@@ -1,4 +1,4 @@
-import { Route } from '@/types';
+import { Route, ViewType } from '@/types';
import got from '@/utils/got';
import { parseDate } from '@/utils/parse-date';
@@ -18,9 +18,61 @@ const titles = {
export const route: Route = {
path: '/hot/:category?',
- categories: ['social-media'],
+ categories: ['social-media', 'popular'],
example: '/zhihu/hot',
- parameters: { category: '分类,见下表,默认为全站' },
+ view: ViewType.Articles,
+ parameters: {
+ category: {
+ description: '分类',
+ default: 'total',
+ options: [
+ {
+ value: 'total',
+ label: '全站',
+ },
+ {
+ value: 'focus',
+ label: '国际',
+ },
+ {
+ value: 'science',
+ label: '科学',
+ },
+ {
+ value: 'car',
+ label: '汽车',
+ },
+ {
+ value: 'zvideo',
+ label: '视频',
+ },
+ {
+ value: 'fashion',
+ label: '时尚',
+ },
+ {
+ value: 'depth',
+ label: '时事',
+ },
+ {
+ value: 'digital',
+ label: '数码',
+ },
+ {
+ value: 'sport',
+ label: '体育',
+ },
+ {
+ value: 'school',
+ label: '校园',
+ },
+ {
+ value: 'film',
+ label: '影视',
+ },
+ ],
+ },
+ },
features: {
requireConfig: false,
requirePuppeteer: false,
@@ -29,12 +81,9 @@ export const route: Route = {
supportPodcast: false,
supportScihub: false,
},
- name: '知乎分类热榜',
+ name: '知乎热榜',
maintainers: ['nczitzk'],
handler,
- description: `| 全站 | 国际 | 科学 | 汽车 | 视频 | 时尚 | 时事 | 数码 | 体育 | 校园 | 影视 |
- | ----- | ----- | ------- | ---- | ------ | ------- | ----- | ------- | ----- | ------ | ---- |
- | total | focus | science | car | zvideo | fashion | depth | digital | sport | school | film |`,
};
async function handler(ctx) {
diff --git a/lib/routes/zhihu/hotlist.ts b/lib/routes/zhihu/hotlist.ts
deleted file mode 100644
index 9183cfeb5a..0000000000
--- a/lib/routes/zhihu/hotlist.ts
+++ /dev/null
@@ -1,72 +0,0 @@
-import { Route } from '@/types';
-import got from '@/utils/got';
-import { processImage } from './utils';
-import { parseDate } from '@/utils/parse-date';
-
-export const route: Route = {
- path: '/hotlist',
- categories: ['social-media'],
- example: '/zhihu/hotlist',
- parameters: {},
- features: {
- requireConfig: false,
- requirePuppeteer: false,
- antiCrawler: false,
- supportBT: false,
- supportPodcast: false,
- supportScihub: false,
- },
- radar: [
- {
- source: ['www.zhihu.com/hot'],
- },
- ],
- name: '知乎热榜',
- maintainers: ['DIYgod'],
- handler,
- url: 'www.zhihu.com/hot',
-};
-
-async function handler() {
- const {
- data: { data },
- } = await got({
- method: 'get',
- url: 'https://www.zhihu.com/api/v3/explore/guest/feeds?limit=40',
- });
-
- return {
- title: '知乎热榜',
- link: 'https://www.zhihu.com/billboard',
- description: '知乎热榜',
- item: data.map((item) => {
- switch (item.target.type) {
- case 'answer':
- return {
- title: item.target.question.title,
- description: `${item.target.author.name}的回答
${processImage(item.target.content)}`,
- author: item.target.author.name,
- pubDate: parseDate(item.target.updated_time * 1000),
- guid: item.target.id.toString(),
- link: `https://www.zhihu.com/question/${item.target.question.id}/answer/${item.target.id}`,
- };
- case 'article':
- return {
- title: item.target.title,
- description: `${item.target.author.name}的文章
${processImage(item.target.content)}`,
- author: item.target.author.name,
- pubDate: parseDate(item.updated * 1000),
- guid: item.target.id.toString(),
- link: `https://zhuanlan.zhihu.com/p/${item.target.id}`,
- };
- default:
- return {
- title: '未知类型',
- description: '请点击链接提交issue',
- guid: item.target.type,
- link: 'https://github.com/DIYgod/RSSHub/issues',
- };
- }
- }),
- };
-}