mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-01 14:57:14 +08:00
feat: update popular category
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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',
|
||||
},
|
||||
|
||||
@@ -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: [
|
||||
|
||||
@@ -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: [
|
||||
|
||||
@@ -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\`.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
};
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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',
|
||||
};
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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',
|
||||
};
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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: {
|
||||
|
||||
+180
-46
@@ -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) {
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { Namespace } from '@/types';
|
||||
|
||||
export const namespace: Namespace = {
|
||||
name: '微博绿洲',
|
||||
name: '微博',
|
||||
url: 'weibo.com',
|
||||
description: `:::warning
|
||||
微博会针对请求的来源地区返回不同的结果。\
|
||||
|
||||
@@ -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) {
|
||||
|
||||
+56
-7
@@ -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) {
|
||||
|
||||
@@ -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}的回答<br/><br/>${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}的文章<br/><br/>${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',
|
||||
};
|
||||
}
|
||||
}),
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user